工具收藏
This commit is contained in:
parent
ca25e9deec
commit
bb18d1ad55
|
@ -231,6 +231,13 @@
|
||||||
CA8181B02C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181AF2C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m */; };
|
CA8181B02C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181AF2C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m */; };
|
||||||
CA8181B32C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181B22C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m */; };
|
CA8181B32C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181B22C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m */; };
|
||||||
CA8181B62C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181B52C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m */; };
|
CA8181B62C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8181B52C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m */; };
|
||||||
|
CA8EE5172CC88B22009D73E3 /* ExamplePptModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE5162CC88B22009D73E3 /* ExamplePptModel.m */; };
|
||||||
|
CA8EE51A2CC89319009D73E3 /* ExamplePptDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE5192CC89319009D73E3 /* ExamplePptDetailModel.m */; };
|
||||||
|
CA8EE51D2CC8C835009D73E3 /* TongYiXieYiAlterView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE51C2CC8C835009D73E3 /* TongYiXieYiAlterView.m */; };
|
||||||
|
CA8EE5202CC8C89E009D73E3 /* NomoVerbAlterView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE51F2CC8C89E009D73E3 /* NomoVerbAlterView.m */; };
|
||||||
|
CA8EE5232CC8C914009D73E3 /* PayManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE5222CC8C914009D73E3 /* PayManager.m */; };
|
||||||
|
CA8EE5262CC8C920009D73E3 /* VistaInAppPurchaseManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE5252CC8C920009D73E3 /* VistaInAppPurchaseManager.m */; };
|
||||||
|
CA8EE5292CC905BD009D73E3 /* NomoAlterView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA8EE5272CC905BD009D73E3 /* NomoAlterView.m */; };
|
||||||
CAA600CD2CA92FB700026CF4 /* FXErView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600CC2CA92FB700026CF4 /* FXErView.m */; };
|
CAA600CD2CA92FB700026CF4 /* FXErView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600CC2CA92FB700026CF4 /* FXErView.m */; };
|
||||||
CAA600D12CA9565500026CF4 /* KeTangXieZuoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D02CA9565500026CF4 /* KeTangXieZuoViewController.m */; };
|
CAA600D12CA9565500026CF4 /* KeTangXieZuoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D02CA9565500026CF4 /* KeTangXieZuoViewController.m */; };
|
||||||
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D42CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m */; };
|
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D42CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m */; };
|
||||||
|
@ -899,6 +906,20 @@
|
||||||
CA8181B22C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZPGDetailXZView.m; sourceTree = "<group>"; };
|
CA8181B22C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZPGDetailXZView.m; sourceTree = "<group>"; };
|
||||||
CA8181B42C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZPGDetailFJItemView.h; sourceTree = "<group>"; };
|
CA8181B42C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StartKTXZPGDetailFJItemView.h; sourceTree = "<group>"; };
|
||||||
CA8181B52C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZPGDetailFJItemView.m; sourceTree = "<group>"; };
|
CA8181B52C9ECB5800EE7E6E /* StartKTXZPGDetailFJItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartKTXZPGDetailFJItemView.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5152CC88B22009D73E3 /* ExamplePptModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExamplePptModel.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE5162CC88B22009D73E3 /* ExamplePptModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExamplePptModel.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5182CC89319009D73E3 /* ExamplePptDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExamplePptDetailModel.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE5192CC89319009D73E3 /* ExamplePptDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExamplePptDetailModel.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE51B2CC8C835009D73E3 /* TongYiXieYiAlterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TongYiXieYiAlterView.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE51C2CC8C835009D73E3 /* TongYiXieYiAlterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TongYiXieYiAlterView.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE51E2CC8C89D009D73E3 /* NomoVerbAlterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NomoVerbAlterView.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE51F2CC8C89E009D73E3 /* NomoVerbAlterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NomoVerbAlterView.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5212CC8C914009D73E3 /* PayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayManager.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE5222CC8C914009D73E3 /* PayManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PayManager.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5242CC8C91F009D73E3 /* VistaInAppPurchaseManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VistaInAppPurchaseManager.h; sourceTree = "<group>"; };
|
||||||
|
CA8EE5252CC8C920009D73E3 /* VistaInAppPurchaseManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VistaInAppPurchaseManager.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5272CC905BD009D73E3 /* NomoAlterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NomoAlterView.m; sourceTree = "<group>"; };
|
||||||
|
CA8EE5282CC905BD009D73E3 /* NomoAlterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NomoAlterView.h; sourceTree = "<group>"; };
|
||||||
CAA600CB2CA92FB700026CF4 /* FXErView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FXErView.h; sourceTree = "<group>"; };
|
CAA600CB2CA92FB700026CF4 /* FXErView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FXErView.h; sourceTree = "<group>"; };
|
||||||
CAA600CC2CA92FB700026CF4 /* FXErView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FXErView.m; sourceTree = "<group>"; };
|
CAA600CC2CA92FB700026CF4 /* FXErView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FXErView.m; sourceTree = "<group>"; };
|
||||||
CAA600CF2CA9565500026CF4 /* KeTangXieZuoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeTangXieZuoViewController.h; sourceTree = "<group>"; };
|
CAA600CF2CA9565500026CF4 /* KeTangXieZuoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeTangXieZuoViewController.h; sourceTree = "<group>"; };
|
||||||
|
@ -1857,6 +1878,12 @@
|
||||||
CA3868682CC211FE009C98B0 /* LoadAlterView.m */,
|
CA3868682CC211FE009C98B0 /* LoadAlterView.m */,
|
||||||
CA07CD122CC5E5C500AF41ED /* XieYiAlterView.h */,
|
CA07CD122CC5E5C500AF41ED /* XieYiAlterView.h */,
|
||||||
CA07CD132CC5E5C500AF41ED /* XieYiAlterView.m */,
|
CA07CD132CC5E5C500AF41ED /* XieYiAlterView.m */,
|
||||||
|
CA8EE51B2CC8C835009D73E3 /* TongYiXieYiAlterView.h */,
|
||||||
|
CA8EE51C2CC8C835009D73E3 /* TongYiXieYiAlterView.m */,
|
||||||
|
CA8EE51E2CC8C89D009D73E3 /* NomoVerbAlterView.h */,
|
||||||
|
CA8EE51F2CC8C89E009D73E3 /* NomoVerbAlterView.m */,
|
||||||
|
CA8EE5282CC905BD009D73E3 /* NomoAlterView.h */,
|
||||||
|
CA8EE5272CC905BD009D73E3 /* NomoAlterView.m */,
|
||||||
);
|
);
|
||||||
path = alter;
|
path = alter;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -2889,6 +2916,10 @@
|
||||||
CA07CD1F2CC6572E00AF41ED /* WebSocketManager.m */,
|
CA07CD1F2CC6572E00AF41ED /* WebSocketManager.m */,
|
||||||
CA07CD212CC6601500AF41ED /* SSENetWorkManager.h */,
|
CA07CD212CC6601500AF41ED /* SSENetWorkManager.h */,
|
||||||
CA07CD222CC6601500AF41ED /* SSENetWorkManager.m */,
|
CA07CD222CC6601500AF41ED /* SSENetWorkManager.m */,
|
||||||
|
CA8EE5242CC8C91F009D73E3 /* VistaInAppPurchaseManager.h */,
|
||||||
|
CA8EE5252CC8C920009D73E3 /* VistaInAppPurchaseManager.m */,
|
||||||
|
CA8EE5212CC8C914009D73E3 /* PayManager.h */,
|
||||||
|
CA8EE5222CC8C914009D73E3 /* PayManager.m */,
|
||||||
);
|
);
|
||||||
path = NetWorkManager;
|
path = NetWorkManager;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -3000,6 +3031,10 @@
|
||||||
CA10DF972CC74FC70094FEEE /* SSEConfigModel.m */,
|
CA10DF972CC74FC70094FEEE /* SSEConfigModel.m */,
|
||||||
CA10DF9C2CC7AC040094FEEE /* ExamplePicModel.h */,
|
CA10DF9C2CC7AC040094FEEE /* ExamplePicModel.h */,
|
||||||
CA10DF9D2CC7AC040094FEEE /* ExamplePicModel.m */,
|
CA10DF9D2CC7AC040094FEEE /* ExamplePicModel.m */,
|
||||||
|
CA8EE5152CC88B22009D73E3 /* ExamplePptModel.h */,
|
||||||
|
CA8EE5162CC88B22009D73E3 /* ExamplePptModel.m */,
|
||||||
|
CA8EE5182CC89319009D73E3 /* ExamplePptDetailModel.h */,
|
||||||
|
CA8EE5192CC89319009D73E3 /* ExamplePptDetailModel.m */,
|
||||||
);
|
);
|
||||||
path = models;
|
path = models;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -4399,6 +4434,7 @@
|
||||||
CAC806562CA1382500C21AA7 /* StartZNXZView.m in Sources */,
|
CAC806562CA1382500C21AA7 /* StartZNXZView.m in Sources */,
|
||||||
CA07CD1D2CC646AA00AF41ED /* ExampleWriteList.m in Sources */,
|
CA07CD1D2CC646AA00AF41ED /* ExampleWriteList.m in Sources */,
|
||||||
CA4257BD2CA2C65600A36A10 /* StartPayTQViewCell.m in Sources */,
|
CA4257BD2CA2C65600A36A10 /* StartPayTQViewCell.m in Sources */,
|
||||||
|
CA8EE5202CC8C89E009D73E3 /* NomoVerbAlterView.m in Sources */,
|
||||||
CABD8CA72CBFA7A3009A5E5E /* GongJuImageToTextView.m in Sources */,
|
CABD8CA72CBFA7A3009A5E5E /* GongJuImageToTextView.m in Sources */,
|
||||||
CA5D03272CC0DDF0007B3BA5 /* PayPublicView.m in Sources */,
|
CA5D03272CC0DDF0007B3BA5 /* PayPublicView.m in Sources */,
|
||||||
CA5D02A82CC0B2DE007B3BA5 /* ZhangHuGuanLiAlterView.m in Sources */,
|
CA5D02A82CC0B2DE007B3BA5 /* ZhangHuGuanLiAlterView.m in Sources */,
|
||||||
|
@ -4478,6 +4514,7 @@
|
||||||
CA5D03682CC0DE8D007B3BA5 /* YouHuiQuanDuiHuanView.m in Sources */,
|
CA5D03682CC0DE8D007B3BA5 /* YouHuiQuanDuiHuanView.m in Sources */,
|
||||||
CAA600D92CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m in Sources */,
|
CAA600D92CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m in Sources */,
|
||||||
CA0C3AB92CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m in Sources */,
|
CA0C3AB92CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m in Sources */,
|
||||||
|
CA8EE5262CC8C920009D73E3 /* VistaInAppPurchaseManager.m in Sources */,
|
||||||
CAF76E692CBE0A1C00825E5E /* ToolsTypeModel.m in Sources */,
|
CAF76E692CBE0A1C00825E5E /* ToolsTypeModel.m in Sources */,
|
||||||
CB489F8D2744A0BD00DA044A /* NaviGationView.m in Sources */,
|
CB489F8D2744A0BD00DA044A /* NaviGationView.m in Sources */,
|
||||||
CB489F9C2744A0BD00DA044A /* LogTableViewCell.m in Sources */,
|
CB489F9C2744A0BD00DA044A /* LogTableViewCell.m in Sources */,
|
||||||
|
@ -4528,6 +4565,7 @@
|
||||||
CB489F512744A0BD00DA044A /* PGJSearchView.m in Sources */,
|
CB489F512744A0BD00DA044A /* PGJSearchView.m in Sources */,
|
||||||
CABD8C952CBF974E009A5E5E /* GongJuFanYiView.m in Sources */,
|
CABD8C952CBF974E009A5E5E /* GongJuFanYiView.m in Sources */,
|
||||||
CA5D02A42CC0B2DE007B3BA5 /* ImageCollectionViewCell.m in Sources */,
|
CA5D02A42CC0B2DE007B3BA5 /* ImageCollectionViewCell.m in Sources */,
|
||||||
|
CA8EE5232CC8C914009D73E3 /* PayManager.m in Sources */,
|
||||||
CA0D084F2CA53B970086855E /* ShouYeLingYuViewController.m in Sources */,
|
CA0D084F2CA53B970086855E /* ShouYeLingYuViewController.m in Sources */,
|
||||||
CA0D087C2CA55BB80086855E /* ShouYeLiShiJiLuPPTTableViewCell.m in Sources */,
|
CA0D087C2CA55BB80086855E /* ShouYeLiShiJiLuPPTTableViewCell.m in Sources */,
|
||||||
CA8181B02C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m in Sources */,
|
CA8181B02C9EB96000EE7E6E /* StartKTXZPGDetailFJView.m in Sources */,
|
||||||
|
@ -4562,6 +4600,7 @@
|
||||||
CA0D085D2CA543EE0086855E /* ShouYeZCXZTableViewCell.m in Sources */,
|
CA0D085D2CA543EE0086855E /* ShouYeZCXZTableViewCell.m in Sources */,
|
||||||
CA0FD6A82CA900E2009A4417 /* FXTextView.m in Sources */,
|
CA0FD6A82CA900E2009A4417 /* FXTextView.m in Sources */,
|
||||||
CA0D086D2CA548F70086855E /* ShouYeLiShiJiLuPPTTableViewController.m in Sources */,
|
CA0D086D2CA548F70086855E /* ShouYeLiShiJiLuPPTTableViewController.m in Sources */,
|
||||||
|
CA8EE5292CC905BD009D73E3 /* NomoAlterView.m in Sources */,
|
||||||
CA487D932CA4055B00AE773B /* StartPayGoodsCollectionViewCell.m in Sources */,
|
CA487D932CA4055B00AE773B /* StartPayGoodsCollectionViewCell.m in Sources */,
|
||||||
CA4257B62CA2BBB000A36A10 /* StartPayView.m in Sources */,
|
CA4257B62CA2BBB000A36A10 /* StartPayView.m in Sources */,
|
||||||
CB489DDB27449D5D00DA044A /* main.m in Sources */,
|
CB489DDB27449D5D00DA044A /* main.m in Sources */,
|
||||||
|
@ -4618,12 +4657,14 @@
|
||||||
CB489F982744A0BD00DA044A /* BaseModel.m in Sources */,
|
CB489F982744A0BD00DA044A /* BaseModel.m in Sources */,
|
||||||
CA4257B92CA2C42E00A36A10 /* StartPayTQView.m in Sources */,
|
CA4257B92CA2C42E00A36A10 /* StartPayTQView.m in Sources */,
|
||||||
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */,
|
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */,
|
||||||
|
CA8EE5172CC88B22009D73E3 /* ExamplePptModel.m in Sources */,
|
||||||
CB489F9B2744A0BD00DA044A /* YSAPIClient.m in Sources */,
|
CB489F9B2744A0BD00DA044A /* YSAPIClient.m in Sources */,
|
||||||
CB489F822744A0BD00DA044A /* NSData+Base64.m in Sources */,
|
CB489F822744A0BD00DA044A /* NSData+Base64.m in Sources */,
|
||||||
CA3868692CC211FE009C98B0 /* LoadAlterView.m in Sources */,
|
CA3868692CC211FE009C98B0 /* LoadAlterView.m in Sources */,
|
||||||
CB489FA62744A0BD00DA044A /* ZJScrollSegmentView.m in Sources */,
|
CB489FA62744A0BD00DA044A /* ZJScrollSegmentView.m in Sources */,
|
||||||
CA5D035D2CC0DE8D007B3BA5 /* TiXianViewController.m in Sources */,
|
CA5D035D2CC0DE8D007B3BA5 /* TiXianViewController.m in Sources */,
|
||||||
CA0D08332CA4FFB90086855E /* ShouYeBannerTableViewCell.m in Sources */,
|
CA0D08332CA4FFB90086855E /* ShouYeBannerTableViewCell.m in Sources */,
|
||||||
|
CA8EE51D2CC8C835009D73E3 /* TongYiXieYiAlterView.m in Sources */,
|
||||||
CAA600CD2CA92FB700026CF4 /* FXErView.m in Sources */,
|
CAA600CD2CA92FB700026CF4 /* FXErView.m in Sources */,
|
||||||
CA5D03122CC0DDF0007B3BA5 /* PayPublicYouHuiTableViewCell.m in Sources */,
|
CA5D03122CC0DDF0007B3BA5 /* PayPublicYouHuiTableViewCell.m in Sources */,
|
||||||
CA0C3A872CB4C34800E01A72 /* HuanGeSiLuView.m in Sources */,
|
CA0C3A872CB4C34800E01A72 /* HuanGeSiLuView.m in Sources */,
|
||||||
|
@ -4633,6 +4674,7 @@
|
||||||
CA3868572CC1F66E009C98B0 /* LoginAppleView.m in Sources */,
|
CA3868572CC1F66E009C98B0 /* LoginAppleView.m in Sources */,
|
||||||
CAC806642CA151ED00C21AA7 /* StartZNXZSiLuViewController.m in Sources */,
|
CAC806642CA151ED00C21AA7 /* StartZNXZSiLuViewController.m in Sources */,
|
||||||
CB489F962744A0BD00DA044A /* SmsloginCodeModel.m in Sources */,
|
CB489F962744A0BD00DA044A /* SmsloginCodeModel.m in Sources */,
|
||||||
|
CA8EE51A2CC89319009D73E3 /* ExamplePptDetailModel.m in Sources */,
|
||||||
CA0D08612CA547C60086855E /* ShouYeLiShiJiLuViewController.m in Sources */,
|
CA0D08612CA547C60086855E /* ShouYeLiShiJiLuViewController.m in Sources */,
|
||||||
CA11ED642CA6851200209DFC /* CamreTiShiAlterView.m in Sources */,
|
CA11ED642CA6851200209DFC /* CamreTiShiAlterView.m in Sources */,
|
||||||
CB489F712744A0BD00DA044A /* RootTabBarController.m in Sources */,
|
CB489F712744A0BD00DA044A /* RootTabBarController.m in Sources */,
|
||||||
|
|
Binary file not shown.
|
@ -14,8 +14,8 @@
|
||||||
filePath = "ProductApp/ProductMain/引导/智能PPT/StartZNPPTViewController.m"
|
filePath = "ProductApp/ProductMain/引导/智能PPT/StartZNPPTViewController.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "69"
|
startingLineNumber = "82"
|
||||||
endingLineNumber = "69"
|
endingLineNumber = "82"
|
||||||
landmarkName = "-getpasteInfo"
|
landmarkName = "-getpasteInfo"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
filePath = "ProductApp/ProductMain/引导/智能PPT/StartZNPPTViewController.m"
|
filePath = "ProductApp/ProductMain/引导/智能PPT/StartZNPPTViewController.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "66"
|
startingLineNumber = "79"
|
||||||
endingLineNumber = "66"
|
endingLineNumber = "79"
|
||||||
landmarkName = "-getpasteInfo"
|
landmarkName = "-getpasteInfo"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -68,22 +68,6 @@
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "29CF58BA-9A1E-4A94-B2AE-AD4C34DF72E4"
|
|
||||||
shouldBeEnabled = "No"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "ProductApp/ProductMain/NetWorkManager/NetWorkManager.m"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "307"
|
|
||||||
endingLineNumber = "307"
|
|
||||||
landmarkName = "+requestToolsListData:page:type_id:tool_name:is_recommend:Callback:"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
|
|
|
@ -18,7 +18,11 @@
|
||||||
|
|
||||||
#import "IFlyMSC/IFlyMSC.h"
|
#import "IFlyMSC/IFlyMSC.h"
|
||||||
|
|
||||||
@interface AppDelegate ()
|
#import <WXApi.h>
|
||||||
|
#import <AlipaySDK/AlipaySDK.h>
|
||||||
|
|
||||||
|
|
||||||
|
@interface AppDelegate ()<WXApiDelegate>
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -57,6 +61,9 @@
|
||||||
[IFlySpeechUtility createUtility:initString];
|
[IFlySpeechUtility createUtility:initString];
|
||||||
|
|
||||||
|
|
||||||
|
[WXApi registerApp:WeiXinAPPID universalLink:WeiXinUrlLink];
|
||||||
|
|
||||||
|
|
||||||
///禁止黑暗模式
|
///禁止黑暗模式
|
||||||
#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
#if defined(__IPHONE_13_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
|
||||||
if(@available(iOS 13.0,*)){
|
if(@available(iOS 13.0,*)){
|
||||||
|
@ -103,6 +110,74 @@ self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
|
||||||
//
|
//
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
|
||||||
|
{
|
||||||
|
if ([url.host isEqualToString:@"safepay"])
|
||||||
|
{
|
||||||
|
// 支付跳转支付宝钱包进行支付,处理支付结果
|
||||||
|
[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:ZhiFuBaoPayNotifi object:resultDic];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
// if([MobClickLink handleLinkURL:url delegate:self])
|
||||||
|
// {
|
||||||
|
// return YES;
|
||||||
|
// }
|
||||||
|
|
||||||
|
return [WXApi handleOpenURL:url delegate:self];
|
||||||
|
}
|
||||||
|
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>> * __nullable restorableObjects))restorationHandler {
|
||||||
|
|
||||||
|
// if([MobClickLink handleUniversalLink:userActivity delegate:self])
|
||||||
|
// {
|
||||||
|
// return YES;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
return [WXApi handleOpenUniversalLink:userActivity delegate:self];
|
||||||
|
}
|
||||||
|
-(void) onReq:(BaseReq*)reqonReq
|
||||||
|
{
|
||||||
|
NSLog(@"111");
|
||||||
|
}
|
||||||
|
-(void) onResp:(BaseResp*)resp
|
||||||
|
{
|
||||||
|
if ([resp isKindOfClass: [SendAuthResp class]]) {
|
||||||
|
SendAuthResp* authResp = (SendAuthResp*)resp;
|
||||||
|
if (authResp.errCode == 0) {
|
||||||
|
// 用户确认授权,发送全局通知,处理逻辑
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName: WeiXinDengLuSQ
|
||||||
|
object: authResp];
|
||||||
|
} else {
|
||||||
|
// 用户取消授权,发送全局通知,处理逻辑
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName: WeiXinDengLuSQ
|
||||||
|
object: nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ([resp isKindOfClass:[PayResp class]])
|
||||||
|
{
|
||||||
|
PayResp *response=(PayResp*)resp;
|
||||||
|
switch (response.errCode) {
|
||||||
|
case WXSuccess:
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName: WeiXinZhiFuSQ object: @"1"];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case WXErrCodeUserCancel:
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName: WeiXinZhiFuSQ object: @"-1"];
|
||||||
|
[HXHud showMessage:response.errStr.length==0?@"用户取消支付":response.errStr afterDelayType:0];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName: WeiXinZhiFuSQ object: @"0"];
|
||||||
|
[HXHud showMessage:response.errStr.length==0?@"用户取消支付":response.errStr afterDelayType:0];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组@2x(1).png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组@3x(1).png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组 44073@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "组 44073@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
|
@ -217,7 +217,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
[self.dataArray exchangeObjectAtIndex:self.indexPath.row withObjectAtIndex:moveIndexPath.row];
|
@try {
|
||||||
|
[self.dataArray exchangeObjectAtIndex:self.indexPath.row withObjectAtIndex:moveIndexPath.row];
|
||||||
|
} @catch (NSException *exception) {
|
||||||
|
|
||||||
|
} @finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.block(self.dataArray);
|
self.block(self.dataArray);
|
||||||
|
|
|
@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
#define UserInfoModelConfig @"UserInfoModelConfig"
|
#define UserInfoModelConfig @"UserInfoModelConfig"
|
||||||
#define UserInfoModelTemp @"UserInfoModelTemp"
|
#define UserInfoModelTemp @"UserInfoModelTemp"
|
||||||
|
|
||||||
|
@class RoleTreeModelData;
|
||||||
@interface UserInfoModel : NSObject
|
@interface UserInfoModel : NSObject
|
||||||
+(UserInfoModel *)shareModel;
|
+(UserInfoModel *)shareModel;
|
||||||
///登录状态 1已登录
|
///登录状态 1已登录
|
||||||
|
@ -45,14 +45,20 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic , strong) NSString *vip;
|
@property (nonatomic , strong) NSString *vip;
|
||||||
|
|
||||||
@property (nonatomic , assign) BOOL isloadconfig;
|
@property (nonatomic , assign) BOOL isloadconfig;
|
||||||
///领域1教育 2职场
|
/////领域1教育 2职场
|
||||||
@property (nonatomic , strong) NSString *lingyu;
|
//@property (nonatomic , strong) NSString *lingyu;
|
||||||
///1学生 2家长 3老师
|
/////1学生 2家长 3老师
|
||||||
@property (nonatomic , strong) NSString *shenfen;
|
//@property (nonatomic , strong) NSString *shenfen;
|
||||||
|
|
||||||
///余额
|
///余额
|
||||||
@property (nonatomic , strong) NSString *balance;
|
@property (nonatomic , strong) NSString *balance;
|
||||||
|
|
||||||
|
///年级是否全选
|
||||||
|
@property (nonatomic , strong) NSString *isAllLevel;
|
||||||
|
///0学生 1家长 2老师 3职场
|
||||||
|
@property (nonatomic , strong) NSString *identityType;
|
||||||
|
@property (nonatomic , strong) RoleTreeModelData *user_stage;
|
||||||
|
|
||||||
+(void)setLoingState:(NSString *)value;
|
+(void)setLoingState:(NSString *)value;
|
||||||
+(void)setToken:(NSString *)value;
|
+(void)setToken:(NSString *)value;
|
||||||
+(void)setName:(NSString *)value;
|
+(void)setName:(NSString *)value;
|
||||||
|
@ -78,6 +84,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
+(BOOL)PayWXQuanXian;
|
+(BOOL)PayWXQuanXian;
|
||||||
///获取系统的支付fs
|
///获取系统的支付fs
|
||||||
+(NSMutableArray *)getSyetemPay;
|
+(NSMutableArray *)getSyetemPay;
|
||||||
|
///根据身份获取字符串
|
||||||
|
+(NSString *)getidentityTypeString;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -230,4 +230,31 @@ static UserInfoModel *userinfo;
|
||||||
return arrcc;
|
return arrcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///根据身份获取字符串
|
||||||
|
+(NSString *)getidentityTypeString
|
||||||
|
{
|
||||||
|
NSString *str = @"学生";
|
||||||
|
|
||||||
|
switch ([UserInfoModel shareModel].identityType.intValue) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
str = @"家长";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
str = @"老师";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
str = @"上班族";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -27,6 +27,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
#define WeiXinStringPay @"5b6u5L+h5pSv5LuY"
|
#define WeiXinStringPay @"5b6u5L+h5pSv5LuY"
|
||||||
#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY"
|
#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY"
|
||||||
|
|
||||||
|
///zfb
|
||||||
|
#define ZhiFuBaoPayNotifi @"ZhiFuBaoPayNotifi"
|
||||||
|
#define WeiXinDengLuSQ @"WeiXinDengLuSQ" ///登录
|
||||||
|
#define WeiXinZhiFuSQ @"WeiXinZhiFuSQ" ///支付
|
||||||
|
|
||||||
|
|
||||||
|
#define WeiXinAPPID @"wx31efd88bd33ae068"
|
||||||
|
#define WeiXinUrlLink @"https://aiw.batiao8.com/ulink/"
|
||||||
|
|
||||||
|
|
||||||
/// 个推开发者网站中申请App时,注册的AppId、AppKey、AppSecret
|
/// 个推开发者网站中申请App时,注册的AppId、AppKey、AppSecret
|
||||||
#define kGtAppId @"bgxjUoVnGE65VaJLpy40T6"
|
#define kGtAppId @"bgxjUoVnGE65VaJLpy40T6"
|
||||||
#define kGtAppKey @"o20R2nHKevAixnfCD66ZO9"
|
#define kGtAppKey @"o20R2nHKevAixnfCD66ZO9"
|
||||||
|
@ -119,9 +129,6 @@ alpha:alphaValue]
|
||||||
#define UserYinSiUrl @""
|
#define UserYinSiUrl @""
|
||||||
#define UserXieUrl @""
|
#define UserXieUrl @""
|
||||||
|
|
||||||
///微信登录通知
|
|
||||||
#define WeiXinDengLuSQ @"WeiXinDengLuSQ"
|
|
||||||
|
|
||||||
///协议弹窗
|
///协议弹窗
|
||||||
#define UserXieYiOk @"UserXieYiOk"
|
#define UserXieYiOk @"UserXieYiOk"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#import "ExampleCorrectList.h"
|
#import "ExampleCorrectList.h"
|
||||||
#import "ExampleWriteList.h"
|
#import "ExampleWriteList.h"
|
||||||
#import "ExamplePicModel.h"
|
#import "ExamplePicModel.h"
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@ -80,6 +80,24 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
scene:(NSString *)scene
|
scene:(NSString *)scene
|
||||||
Callback:(completeModeBlock)callback;
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
引导页ppt
|
||||||
|
/api/example/ppt
|
||||||
|
role_id
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePptData:(UIView *)view
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
引导页ppt详情
|
||||||
|
/api/example/ppt/detail
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePptDetailData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
#pragma mark - 工具
|
||||||
/*
|
/*
|
||||||
工具类型
|
工具类型
|
||||||
/api/tools/type
|
/api/tools/type
|
||||||
|
@ -113,6 +131,35 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
query:(NSString *)query
|
query:(NSString *)query
|
||||||
Callback:(completeModeBlock)callback;
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
收藏初始化
|
||||||
|
/api/tools/fav/init
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavInitData:(UIView *)view
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
工具收藏列表
|
||||||
|
/api/tools/fav
|
||||||
|
page
|
||||||
|
size
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavData:(UIView *)view
|
||||||
|
page:(int)page
|
||||||
|
size:(NSString *)size
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
|
/*
|
||||||
|
添加工具收藏
|
||||||
|
/api/tools/fav
|
||||||
|
tool_id
|
||||||
|
type 0收藏 1取消
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavCollectData:(UIView *)view
|
||||||
|
type:(int)type
|
||||||
|
tool_id:(NSString *)tool_id
|
||||||
|
Callback:(completeModeBlock)callback;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
语言列表key分组
|
语言列表key分组
|
||||||
/api/translate/language/key
|
/api/translate/language/key
|
||||||
|
|
|
@ -230,7 +230,75 @@
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
引导页ppt
|
||||||
|
/api/example/ppt
|
||||||
|
role_id
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePptData:(UIView *)view
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/ppt" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
|
BOOL state = NO;
|
||||||
|
NSString *describle = @"";
|
||||||
|
if (responseObject==nil) {
|
||||||
|
describle = @"网络错误";
|
||||||
|
BaseModel *model = [BaseModel new];
|
||||||
|
model.message =describle;
|
||||||
|
callback(state,model,describle);
|
||||||
|
}else{
|
||||||
|
NSDictionary *dicAll=responseObject;
|
||||||
|
describle = dicAll[@"message"];
|
||||||
|
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||||
|
state = YES;
|
||||||
|
}
|
||||||
|
callback(state,[ExamplePptModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
引导页ppt详情
|
||||||
|
/api/example/ppt/detail
|
||||||
|
id
|
||||||
|
*/
|
||||||
|
+ (void)requestExamplePptDetailData:(UIView *)view
|
||||||
|
ID:(NSString *)ID
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/example/ppt/detail" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
|
BOOL state = NO;
|
||||||
|
NSString *describle = @"";
|
||||||
|
if (responseObject==nil) {
|
||||||
|
describle = @"网络错误";
|
||||||
|
BaseModel *model = [BaseModel new];
|
||||||
|
model.message =describle;
|
||||||
|
callback(state,model,describle);
|
||||||
|
}else{
|
||||||
|
NSDictionary *dicAll=responseObject;
|
||||||
|
describle = dicAll[@"message"];
|
||||||
|
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||||
|
state = YES;
|
||||||
|
}
|
||||||
|
callback(state,[ExamplePptDetailModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 工具
|
||||||
|
|
||||||
/*
|
/*
|
||||||
工具类型
|
工具类型
|
||||||
|
@ -347,6 +415,123 @@
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
收藏初始化
|
||||||
|
/api/tools/fav/init
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavInitData:(UIView *)view
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/tools/fav/init" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
|
BOOL state = NO;
|
||||||
|
NSString *describle = @"";
|
||||||
|
if (responseObject==nil) {
|
||||||
|
describle = @"网络错误";
|
||||||
|
BaseModel *model = [BaseModel new];
|
||||||
|
model.message =describle;
|
||||||
|
callback(state,model,describle);
|
||||||
|
}else{
|
||||||
|
NSDictionary *dicAll=responseObject;
|
||||||
|
describle = dicAll[@"message"];
|
||||||
|
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||||
|
state = YES;
|
||||||
|
}
|
||||||
|
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
工具收藏列表
|
||||||
|
/api/tools/fav
|
||||||
|
page
|
||||||
|
size
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavData:(UIView *)view
|
||||||
|
page:(int)page
|
||||||
|
size:(NSString *)size
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
[dicQuery setObject:[NSString stringWithFormat:@"%d",page] forKey:@"page"];
|
||||||
|
[dicQuery setObject:size forKey:@"size"];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/tools/fav" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
|
BOOL state = NO;
|
||||||
|
NSString *describle = @"";
|
||||||
|
if (responseObject==nil) {
|
||||||
|
describle = @"网络错误";
|
||||||
|
BaseModel *model = [BaseModel new];
|
||||||
|
model.message =describle;
|
||||||
|
callback(state,model,describle);
|
||||||
|
}else{
|
||||||
|
NSDictionary *dicAll=responseObject;
|
||||||
|
describle = dicAll[@"message"];
|
||||||
|
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||||
|
state = YES;
|
||||||
|
}
|
||||||
|
callback(state,[ToolsListModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
添加工具收藏
|
||||||
|
/api/tools/fav
|
||||||
|
tool_id
|
||||||
|
type 0收藏 1取消
|
||||||
|
*/
|
||||||
|
+ (void)requestToolsFavCollectData:(UIView *)view
|
||||||
|
type:(int)type
|
||||||
|
tool_id:(NSString *)tool_id
|
||||||
|
Callback:(completeModeBlock)callback
|
||||||
|
{
|
||||||
|
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
|
||||||
|
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
int pushtype = 2;
|
||||||
|
if(type==1)
|
||||||
|
{
|
||||||
|
pushtype = 4;
|
||||||
|
[dicQuery setObject:[Tools isStringnil:tool_id] forKey:@"tool_id"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[dicpush setObject:[Tools isStringnil:tool_id] forKey:@"tool_id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:pushtype url:@"api/tools/fav" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
|
BOOL state = NO;
|
||||||
|
NSString *describle = @"";
|
||||||
|
if (responseObject==nil) {
|
||||||
|
describle = @"网络错误";
|
||||||
|
BaseModel *model = [BaseModel new];
|
||||||
|
model.message =describle;
|
||||||
|
callback(state,model,describle);
|
||||||
|
}else{
|
||||||
|
NSDictionary *dicAll=responseObject;
|
||||||
|
describle = dicAll[@"message"];
|
||||||
|
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||||
|
state = YES;
|
||||||
|
}
|
||||||
|
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
语言列表key分组
|
语言列表key分组
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
//
|
||||||
|
// PayManager.h
|
||||||
|
// ProductApp
|
||||||
|
// 支付管理工具
|
||||||
|
// Created by 工作 on 2024/8/6.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@protocol PayManagerDelegate <NSObject>
|
||||||
|
|
||||||
|
-(void)paySuccess;
|
||||||
|
-(void)payCancle;
|
||||||
|
-(void)payFaile;
|
||||||
|
-(void)goodsPrice:(NSArray *)product;
|
||||||
|
@end
|
||||||
|
@interface PayManager : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *orderId;
|
||||||
|
///
|
||||||
|
@property (nonatomic , weak) id<PayManagerDelegate>delegate;
|
||||||
|
+(instancetype)sharedInstance;
|
||||||
|
///coupon 优惠券的ID,目前支持单个优惠券
|
||||||
|
-(void)creatOrderGoodsid:(NSString *)goods_id pay_type:(NSString *)pay_type source:(NSString *)source extra:(NSDictionary *)extra applegoodsid:(NSString *)applegoodsid applegoodsNumber:(int)number coupon:(NSString *)coupon;
|
||||||
|
///获取所有苹果商品价格
|
||||||
|
-(void)getGoodsPrice:(NSArray *)arr;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,350 @@
|
||||||
|
//
|
||||||
|
// PayManager.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/8/6.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "PayManager.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
#import <WXApi.h>
|
||||||
|
#import <AlipaySDK/AlipaySDK.h>
|
||||||
|
#import "VistaInAppPurchaseManager.h"
|
||||||
|
|
||||||
|
static PayManager *manager = nil;
|
||||||
|
|
||||||
|
@interface PayManager ()<VistaInAppPurchaseManagerDelegate>
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *outTradeNo;
|
||||||
|
///
|
||||||
|
@property (nonatomic , assign) int number;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) VistaInAppPurchaseManager *payManager;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *source;
|
||||||
|
|
||||||
|
@property (nonatomic , assign) NSInteger orderNumber;
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
|
@implementation PayManager
|
||||||
|
+(instancetype)sharedInstance{
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
if (manager == nil) {
|
||||||
|
manager = [[PayManager alloc]init];
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
return manager;
|
||||||
|
}
|
||||||
|
-(void)creatOrderGoodsid:(NSString *)goods_id pay_type:(NSString *)pay_type source:(NSString *)source extra:(NSDictionary *)extra applegoodsid:(NSString *)applegoodsid applegoodsNumber:(int)number coupon:(NSString *)coupon
|
||||||
|
{
|
||||||
|
self.source = source;
|
||||||
|
self.number = number;
|
||||||
|
|
||||||
|
[LoadAlterView show];
|
||||||
|
[PublicNetWorkManager requestOrderData:nil goods_id:goods_id pay_type:pay_type source:source pay_source:@"app" coupon:coupon Callback:^(BOOL state, PayOrderModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.outTradeNo = responseObject.data.outTradeNo;
|
||||||
|
self.orderId = responseObject.data.orderId;
|
||||||
|
if([pay_type isEqualToString:@"weixin"])
|
||||||
|
{
|
||||||
|
if([Tools isStringnil:responseObject.data.partnerId].length==0)
|
||||||
|
{
|
||||||
|
[self getOrderState];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self weixinPay:responseObject.data];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if([pay_type isEqualToString:@"alipay"])
|
||||||
|
{
|
||||||
|
if([Tools isStringnil:responseObject.data.payParam].length==0)
|
||||||
|
{
|
||||||
|
[self getOrderState];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self zhifubaoPay:responseObject.data];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if([pay_type isEqualToString:@"balance"])
|
||||||
|
{
|
||||||
|
[self getOrderState];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self applePay:@[[Tools isStringnil:applegoodsid]]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - wx
|
||||||
|
-(void)weixinPay:(PayOrderModelData *)model
|
||||||
|
{
|
||||||
|
|
||||||
|
@try {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:WeiXinZhiFuSQ object:nil];
|
||||||
|
} @catch (NSException *exception) {
|
||||||
|
|
||||||
|
} @finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(weixinPayNotiti:) name:WeiXinZhiFuSQ object:nil];
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
PayReq *request = [[PayReq alloc] init];
|
||||||
|
request.partnerId = model.partnerId;
|
||||||
|
request.prepayId= model.prepayId;
|
||||||
|
request.package = model.package;
|
||||||
|
request.nonceStr= model.nonceStr;
|
||||||
|
request.timeStamp = model.timeStamp.intValue;
|
||||||
|
request.sign= model.sign;
|
||||||
|
[WXApi sendReq:request completion:^(BOOL success) {
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)weixinPayNotiti:(NSNotification *)notifi
|
||||||
|
{
|
||||||
|
if([notifi.object intValue] == 1)
|
||||||
|
{///支付成功
|
||||||
|
[LoadAlterView show];
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
self.orderNumber = 0;
|
||||||
|
[self getOrderState];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if([notifi.object intValue] == -1)
|
||||||
|
{///用户取消
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payCancle)])
|
||||||
|
{
|
||||||
|
[self.delegate payCancle];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payFaile)])
|
||||||
|
{
|
||||||
|
[self.delegate payFaile];
|
||||||
|
}
|
||||||
|
[UserInfoModel shijianShangBao:1 key:@"client.wxpay.err" value:@"" extra:@""];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma mark -zfb
|
||||||
|
-(void)zhifubaoPay:(PayOrderModelData *)model
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
@try {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:ZhiFuBaoPayNotifi object:nil];
|
||||||
|
} @catch (NSException *exception) {
|
||||||
|
|
||||||
|
} @finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(zhifubaoPayNotifi:) name:ZhiFuBaoPayNotifi object:nil];
|
||||||
|
[[AlipaySDK defaultService] payOrder:model.payParam fromScheme:@"ailipayAIWrite" callback:^(NSDictionary *resultDic) {
|
||||||
|
[self zfbDic:resultDic];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)zhifubaoPayNotifi:(NSNotification *)notifi
|
||||||
|
{
|
||||||
|
NSDictionary *dic = notifi.object;
|
||||||
|
[self zfbDic:dic];
|
||||||
|
}
|
||||||
|
-(void)zfbDic:(NSDictionary *)dic
|
||||||
|
{
|
||||||
|
if([[dic objectForKey:@"resultStatus"] intValue] == 9000)
|
||||||
|
{///成功
|
||||||
|
[LoadAlterView show];
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
self.orderNumber = 0;
|
||||||
|
[self getOrderState];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{///失败
|
||||||
|
if([[dic objectForKey:@"resultStatus"] intValue] == 6001)
|
||||||
|
{///取消支付
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payCancle)])
|
||||||
|
{
|
||||||
|
[self.delegate payCancle];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payFaile)])
|
||||||
|
{
|
||||||
|
[self.delegate payFaile];
|
||||||
|
}
|
||||||
|
[UserInfoModel shijianShangBao:1 key:@"client.alipay.err" value:@"" extra:@""];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取苹果商店商品价格
|
||||||
|
-(void)getAppleGoodsPrice:(NSArray *)arr
|
||||||
|
{
|
||||||
|
if(self.payManager==nil)
|
||||||
|
{
|
||||||
|
self.payManager = [VistaInAppPurchaseManager sharedInstance];
|
||||||
|
[self.payManager setDelegate:self];
|
||||||
|
}
|
||||||
|
[self.payManager requestAllGoodsPrice:arr];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - apple
|
||||||
|
-(void)applePay:(NSArray *)arrGoodsID
|
||||||
|
{
|
||||||
|
if(self.payManager==nil)
|
||||||
|
{
|
||||||
|
self.payManager = [VistaInAppPurchaseManager sharedInstance];
|
||||||
|
[self.payManager setDelegate:self];
|
||||||
|
}
|
||||||
|
[self.payManager requestProductWithIDs:arrGoodsID];
|
||||||
|
}
|
||||||
|
///获取所有苹果商品价格
|
||||||
|
-(void)getGoodsPrice:(NSArray *)arr
|
||||||
|
{
|
||||||
|
if(self.payManager==nil)
|
||||||
|
{
|
||||||
|
self.payManager = [VistaInAppPurchaseManager sharedInstance];
|
||||||
|
[self.payManager setDelegate:self];
|
||||||
|
}
|
||||||
|
[self.payManager requestAllGoodsPrice:arr];
|
||||||
|
}
|
||||||
|
#pragma mark - Apple支付
|
||||||
|
///所有商品价格信息
|
||||||
|
-(void)receiveProductInfos:(NSArray *)product
|
||||||
|
{
|
||||||
|
if(self.delegate)
|
||||||
|
{
|
||||||
|
[self.delegate goodsPrice:product];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//购买商品回调
|
||||||
|
-(void)receiveProductInfo:(SKProduct *)product{
|
||||||
|
if (product != nil) {
|
||||||
|
if (![self.payManager purchaseProudct:product outTradeNo:self.outTradeNo goodsNumber:self.number]) {
|
||||||
|
[HXHud showMessage:@"您禁止了应用内购买权限,请到设置中开启" afterDelayType:0];
|
||||||
|
}
|
||||||
|
NSLog(@"SKProduct 描述信息%@", [product description]);
|
||||||
|
NSLog(@"产品标题 %@" , product.localizedTitle);
|
||||||
|
NSLog(@"产品描述信息: %@" , product.localizedDescription);
|
||||||
|
NSLog(@"价格: %@" , product.price);
|
||||||
|
NSLog(@"Product id: %@" , product.productIdentifier);
|
||||||
|
}else{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:@"无法连接App store!" afterDelayType:0];
|
||||||
|
[UserInfoModel shijianShangBao:1 key:@"client.apple.err" value:self.source extra:@"无法连接App store!"];
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payFaile)])
|
||||||
|
{
|
||||||
|
[self.delegate payFaile];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma mark-VistaInAppPurchaseManagerDelegate
|
||||||
|
-(void)successfulPurchaseOfId:(NSString *)productID andReceipt:(NSData *)transactionReceipt{
|
||||||
|
NSString *transactionReceiptString = [transactionReceipt base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||||
|
[LoadAlterView show];
|
||||||
|
[PublicNetWorkManager requestOrderNotifyAppleData:nil order_id:self.orderId receipt:transactionReceiptString Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
self.orderNumber = 0;
|
||||||
|
[self getOrderState];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[UserInfoModel shijianShangBao:1 key:@"client.apple.err" value:self.source extra:[Tools isStringnil:responseObject.message]];
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
//失败回调
|
||||||
|
- (void)failedPurchaseWithError:(NSString *)errorDescripiton {
|
||||||
|
[UserInfoModel shijianShangBao:1 key:@"client.apple.err" value:self.source extra:[Tools isStringnil:errorDescripiton]];
|
||||||
|
if(self.delegate&&[self.delegate respondsToSelector:@selector(payFaile)])
|
||||||
|
{
|
||||||
|
[self.delegate payFaile];
|
||||||
|
}
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:errorDescripiton afterDelayType:0];
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取订单状态
|
||||||
|
-(void)getOrderState
|
||||||
|
{
|
||||||
|
NSLog(@"cg");
|
||||||
|
[PublicNetWorkManager requestOrderGetData:nil order_id:self.orderId Callback:^(BOOL state, OrderInfoModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.orderNumber+=1;
|
||||||
|
if(responseObject.data.status.intValue == 2)
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:@"购买成功" afterDelayType:1];
|
||||||
|
if(self.delegate)
|
||||||
|
{
|
||||||
|
[self.delegate paySuccess];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(self.orderNumber>=10)
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:@"请确认是否支付成功" afterDelayType:1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[self getOrderState];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if(responseObject.data.status.intValue == 1 )
|
||||||
|
// {
|
||||||
|
// [LoadAlterView dismiss];
|
||||||
|
// [HXHud showMessage:@"请确认是否支付成功" afterDelayType:1];
|
||||||
|
// }
|
||||||
|
// else if(responseObject.data.status.intValue == 2)
|
||||||
|
// {
|
||||||
|
// [LoadAlterView dismiss];
|
||||||
|
// [HXHud showMessage:@"购买成功" afterDelayType:1];
|
||||||
|
// if(self.delegate)
|
||||||
|
// {
|
||||||
|
// [self.delegate paySuccess];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// [LoadAlterView dismiss];
|
||||||
|
// [HXHud showMessage:@"请确认是否支付成功" afterDelayType:1];
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
@end
|
|
@ -8,7 +8,7 @@
|
||||||
#import "BaseModel.h"
|
#import "BaseModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
@class UserModelData,UserModelDataOrigin;
|
@class UserModelData,UserModelDataOrigin,RoleTreeModelData;
|
||||||
@interface UserModel : BaseModel
|
@interface UserModel : BaseModel
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UserModelData *data;
|
@property (nonatomic , strong) UserModelData *data;
|
||||||
|
@ -51,11 +51,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UserModelDataOrigin *origin;
|
@property (nonatomic , strong) UserModelDataOrigin *origin;
|
||||||
|
|
||||||
///本月下载字节数
|
|
||||||
@property (nonatomic , strong) NSString *month_download_size;
|
|
||||||
|
|
||||||
///本月下载次数
|
|
||||||
@property (nonatomic , strong) NSString *month_download_count;
|
|
||||||
///余额
|
///余额
|
||||||
@property (nonatomic , strong) NSString *balance;
|
@property (nonatomic , strong) NSString *balance;
|
||||||
///优惠券数量
|
///优惠券数量
|
||||||
|
@ -68,6 +63,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (nonatomic , strong) NSString *bank_user_name;
|
@property (nonatomic , strong) NSString *bank_user_name;
|
||||||
@property (nonatomic , strong) NSString *bank_phone;
|
@property (nonatomic , strong) NSString *bank_phone;
|
||||||
|
|
||||||
|
///年级是否全选
|
||||||
|
@property (nonatomic , strong) NSString *isAllLevel;
|
||||||
|
///0学生 1家长 2老师 3职场
|
||||||
|
@property (nonatomic , strong) NSString *identityType;
|
||||||
|
@property (nonatomic , strong) RoleTreeModelData *user_stage;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface UserModelDataOrigin : NSObject
|
@interface UserModelDataOrigin : NSObject
|
||||||
|
@ -90,5 +91,4 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "UserModel.h"
|
#import "UserModel.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
|
||||||
@implementation UserModel
|
@implementation UserModel
|
||||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
@ -14,9 +15,11 @@
|
||||||
@end
|
@end
|
||||||
@implementation UserModelData
|
@implementation UserModelData
|
||||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
return @{@"origin" : [UserModelDataOrigin class]};
|
return @{@"origin" : [UserModelDataOrigin class],
|
||||||
|
@"user_stage" : [RoleTreeModelData class]};
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
@implementation UserModelDataOrigin
|
@implementation UserModelDataOrigin
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
//
|
||||||
|
// VistaInAppPurchaseManager.h
|
||||||
|
// ProductApp
|
||||||
|
// 内购管理
|
||||||
|
// Created by 工作 on 2024/7/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <StoreKit/StoreKit.h>
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol VistaInAppPurchaseManagerDelegate <NSObject>
|
||||||
|
//接收到商品信息
|
||||||
|
-(void)receiveProductInfo:(SKProduct *)product;
|
||||||
|
///所有商品价格信息
|
||||||
|
-(void)receiveProductInfos:(NSArray *)product;
|
||||||
|
|
||||||
|
//购买成功反馈
|
||||||
|
-(void)successfulPurchaseOfId:(NSString *)productID andReceipt:(NSData *)transactionReceipt;
|
||||||
|
//购买失败反馈
|
||||||
|
-(void)failedPurchaseWithError:(NSString *)errorDescripiton;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface VistaInAppPurchaseManager : NSObject
|
||||||
|
@property (nonatomic, weak)id<VistaInAppPurchaseManagerDelegate> delegate;
|
||||||
|
//单例
|
||||||
|
+(instancetype)sharedInstance;
|
||||||
|
#pragma mark - 获取内购商品价格
|
||||||
|
-(void)requestAllGoodsPrice:(NSArray *)arr;
|
||||||
|
/*
|
||||||
|
* 请求商品信息,productID 商品ID
|
||||||
|
*/
|
||||||
|
-(void)requestProductWithID:(NSString *)productID;
|
||||||
|
-(void)requestProductWithIDs:(NSArray *)productIDs;
|
||||||
|
/*
|
||||||
|
* 购买商品 outTradeNo订单编号 如果有需要,在这里可以加入商品数量
|
||||||
|
*/
|
||||||
|
-(BOOL)purchaseProudct:(SKProduct *)skProduct outTradeNo:(NSString *)outTradeNo goodsNumber:(NSInteger)number;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,176 @@
|
||||||
|
//
|
||||||
|
// VistaInAppPurchaseManager.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/7/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "VistaInAppPurchaseManager.h"
|
||||||
|
|
||||||
|
static VistaInAppPurchaseManager *manager = nil;
|
||||||
|
|
||||||
|
@interface VistaInAppPurchaseManager ()<SKProductsRequestDelegate, SKPaymentTransactionObserver>
|
||||||
|
{
|
||||||
|
SKProduct *myProduct;
|
||||||
|
|
||||||
|
BOOL isjiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation VistaInAppPurchaseManager
|
||||||
|
|
||||||
|
+(instancetype)sharedInstance{
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
if (manager == nil) {
|
||||||
|
manager = [[VistaInAppPurchaseManager alloc]init];
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
return manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - 获取内购商品价格
|
||||||
|
-(void)requestAllGoodsPrice:(NSArray *)arr
|
||||||
|
{
|
||||||
|
isjiage = YES;
|
||||||
|
NSMutableSet *setcc = [NSMutableSet new];
|
||||||
|
[setcc addObjectsFromArray:arr];
|
||||||
|
|
||||||
|
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:setcc];
|
||||||
|
productRequest.delegate = self;
|
||||||
|
[productRequest start];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark ------ public Methods
|
||||||
|
-(void)requestProductWithID:(NSString *)productID{
|
||||||
|
isjiage = NO;
|
||||||
|
if (productID.length > 0) {
|
||||||
|
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObject:productID]];
|
||||||
|
productRequest.delegate = self;
|
||||||
|
[productRequest start];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
NSLog(@"productID为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)requestProductWithIDs:(NSArray *)productIDs
|
||||||
|
{
|
||||||
|
isjiage = NO;
|
||||||
|
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithArray:productIDs]];
|
||||||
|
productRequest.delegate = self;
|
||||||
|
[productRequest start];
|
||||||
|
}
|
||||||
|
-(BOOL)purchaseProudct:(SKProduct *)skProduct outTradeNo:(NSString *)outTradeNo goodsNumber:(NSInteger)number{
|
||||||
|
|
||||||
|
if (skProduct != nil) {
|
||||||
|
if ([SKPaymentQueue canMakePayments]) {
|
||||||
|
SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:skProduct];
|
||||||
|
payment.applicationUsername = outTradeNo;
|
||||||
|
payment.quantity = number;
|
||||||
|
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
|
||||||
|
[[SKPaymentQueue defaultQueue] addPayment:payment];
|
||||||
|
return YES;
|
||||||
|
}else{
|
||||||
|
NSLog(@"失败,用户禁止应用内付费购买.");
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[_delegate receiveProductInfo:myProduct];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark ------ SKProductsRequestDelegate
|
||||||
|
|
||||||
|
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
|
||||||
|
NSArray *productArr = response.products;
|
||||||
|
if (productArr.count >0) {
|
||||||
|
if(isjiage)
|
||||||
|
{
|
||||||
|
if(_delegate && [_delegate respondsToSelector:@selector(receiveProductInfos:)])
|
||||||
|
{
|
||||||
|
[_delegate receiveProductInfos:productArr];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
myProduct = [productArr objectAtIndex:0];
|
||||||
|
[_delegate receiveProductInfo:myProduct];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
NSLog(@"无法购买商品信息,购买失败");
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
[_delegate receiveProductInfo:myProduct];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark ------ SKPaymentTransactionObserver
|
||||||
|
|
||||||
|
-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray<SKPaymentTransaction *> *)transactions{
|
||||||
|
for (SKPaymentTransaction *transaction in transactions) {
|
||||||
|
switch (transaction.transactionState) {
|
||||||
|
case SKPaymentTransactionStatePurchasing://商品添加进列表
|
||||||
|
NSLog(@"商品:%@被添加进购买列表",myProduct.localizedTitle);
|
||||||
|
// [LoadAlterView dismiss];
|
||||||
|
break;
|
||||||
|
case SKPaymentTransactionStatePurchased://交易成功
|
||||||
|
// [LoadAlterView showView];
|
||||||
|
[self completeTransaction:transaction];
|
||||||
|
break;
|
||||||
|
case SKPaymentTransactionStateFailed://交易失败
|
||||||
|
[self failedTransaction:transaction];
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
NSLog(@"交易失败");
|
||||||
|
//发送通知
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"failNotification" object:self userInfo:nil];
|
||||||
|
break;
|
||||||
|
case SKPaymentTransactionStateRestored://已购买过该商品
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKPaymentTransactionStateDeferred://交易延迟
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
default:
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark ---- private Methods
|
||||||
|
|
||||||
|
-(void)completeTransaction:(SKPaymentTransaction *)transaction{
|
||||||
|
NSURL *receiptUrl = [[NSBundle mainBundle] appStoreReceiptURL];
|
||||||
|
NSData *receiptData = [NSData dataWithContentsOfURL:receiptUrl];
|
||||||
|
[_delegate successfulPurchaseOfId:transaction.payment.productIdentifier andReceipt:receiptData];
|
||||||
|
// NSString *str = transaction.payment.applicationUsername;
|
||||||
|
// [[NSUserDefaults standardUserDefaults] setObject:receiptData forKey:@"receiptData"];
|
||||||
|
// [[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
[[SKPaymentQueue defaultQueue]finishTransaction:transaction];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)failedTransaction:(SKPaymentTransaction *)transaction{
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if (transaction.error.code != SKErrorPaymentCancelled && transaction.error.code != SKErrorUnknown) {
|
||||||
|
[_delegate failedPurchaseWithError:transaction.error.localizedDescription];
|
||||||
|
}
|
||||||
|
else if (transaction.error.code == SKErrorPaymentCancelled)
|
||||||
|
{
|
||||||
|
[_delegate failedPurchaseWithError:@"用户取消支付"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[_delegate failedPurchaseWithError:transaction.error.localizedDescription];
|
||||||
|
}
|
||||||
|
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)dealloc{
|
||||||
|
[[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,68 @@
|
||||||
|
//
|
||||||
|
// ExamplePptDetailModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
#import "ExamplePptModel.h"
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class ExamplePptDetailModelData,ExamplePptDetailModelDataResult,ExamplePptDetailModelDataResultImages,ExamplePptDetailModelDataResultOutline,ExamplePptDetailModelDataResultOutlineChapters,ExamplePptDetailModelDataResultOutlineChaptersItem;
|
||||||
|
@interface ExamplePptDetailModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelData *data;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *ID;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *name;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *image;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelDataResult *result;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *create_time;
|
||||||
|
@property (nonatomic , strong) ExamplePptModelDataItemsConfig *config;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelDataResult : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *images;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelDataResultOutline *outline;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelDataResultImages : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *url;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *desc;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelDataResultOutline : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *chapters;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *subTitle;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *title;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *end;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *fileId;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelDataResultOutlineChapters : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *chapterTitle;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *chapterContents;
|
||||||
|
|
||||||
|
///自己添加的字段
|
||||||
|
@property (nonatomic , assign) BOOL isTitle;
|
||||||
|
|
||||||
|
@end
|
||||||
|
@interface ExamplePptDetailModelDataResultOutlineChaptersItem : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *chapterTitle;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,47 @@
|
||||||
|
//
|
||||||
|
// ExamplePptDetailModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
|
|
||||||
|
@implementation ExamplePptDetailModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [ExamplePptDetailModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelData
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"result" : [ExamplePptDetailModelDataResult class],
|
||||||
|
@"config" : [ExamplePptModelDataItemsConfig class]};
|
||||||
|
}
|
||||||
|
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
return @{@"ID" : @"id"};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelDataResult
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"images" : [ExamplePptDetailModelDataResultImages class],
|
||||||
|
@"outline":[ExamplePptDetailModelDataResultOutline class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelDataResultImages
|
||||||
|
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelDataResultOutline
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"chapters" : [ExamplePptDetailModelDataResultOutlineChapters class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelDataResultOutlineChapters
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"chapterContents" : [ExamplePptDetailModelDataResultOutlineChaptersItem class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptDetailModelDataResultOutlineChaptersItem
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
//
|
||||||
|
// ExamplePptModel.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "BaseModel.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@class ExamplePptModelData,ExamplePptModelDataItems,ExamplePptModelDataItemsConfig;
|
||||||
|
@interface ExamplePptModel : BaseModel
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptModelData *data;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptModelData : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *items;
|
||||||
|
@end
|
||||||
|
@interface ExamplePptModelDataItems : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *ID;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *name;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *image;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptModelDataItemsConfig *config;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *create_time;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface ExamplePptModelDataItemsConfig : NSObject
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *file;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *file_type;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *query;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *tag;
|
||||||
|
|
||||||
|
@end
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,31 @@
|
||||||
|
//
|
||||||
|
// ExamplePptModel.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/10/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "ExamplePptModel.h"
|
||||||
|
|
||||||
|
@implementation ExamplePptModel
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"data" : [ExamplePptModelData class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptModelData
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"items" : [ExamplePptModelDataItems class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptModelDataItems
|
||||||
|
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||||
|
{
|
||||||
|
return @{@"ID" : @"id"};
|
||||||
|
}
|
||||||
|
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||||
|
return @{@"config" : [ExamplePptModelDataItemsConfig class]};
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
@implementation ExamplePptModelDataItemsConfig
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,16 @@
|
||||||
|
//
|
||||||
|
// NomoAlterView.h
|
||||||
|
// ProductApp
|
||||||
|
// 按钮扁平
|
||||||
|
// Created by 工作 on 2024/6/20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface NomoAlterView : UIView
|
||||||
|
+(void)showInfo:(NSString *)title SelectTag:(nullable void (^)(NSInteger tag))BackSelectTag;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,135 @@
|
||||||
|
//
|
||||||
|
// NomoAlterView.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/6/20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "NomoAlterView.h"
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
typedef void(^NomoAlterViewBack)(NSInteger selectTag);
|
||||||
|
|
||||||
|
@interface NomoAlterView ()
|
||||||
|
@property (nonatomic , strong) UILabel *lbname;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strtitle;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NomoAlterViewBack bakcValue;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NomoAlterView
|
||||||
|
|
||||||
|
-(id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
if(self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
[self setBackgroundColor:RGBACOLOR(0, 0, 0, 0.4)];
|
||||||
|
|
||||||
|
UIView *viewback = [[UIView alloc] init];
|
||||||
|
[viewback setBackgroundColor:[UIColor whiteColor]];
|
||||||
|
[self addSubview:viewback];
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(50);
|
||||||
|
make.right.equalTo(self).offset(-50);
|
||||||
|
make.center.equalTo(self);
|
||||||
|
}];
|
||||||
|
[viewback.layer setMasksToBounds:YES];
|
||||||
|
[viewback.layer setCornerRadius:20];
|
||||||
|
|
||||||
|
|
||||||
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
|
[lbname setText:@"是否删除"];
|
||||||
|
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
|
[lbname setTextAlignment:NSTextAlignmentCenter];
|
||||||
|
[lbname setFont:[UIFont boldSystemFontOfSize:18]];
|
||||||
|
[lbname setNumberOfLines:0];
|
||||||
|
[viewback addSubview:lbname];
|
||||||
|
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.offset(20);
|
||||||
|
make.left.offset(20);
|
||||||
|
make.right.equalTo(viewback).offset(-20);
|
||||||
|
}];
|
||||||
|
_lbname = lbname;
|
||||||
|
|
||||||
|
UIView *viewline = [[UIView alloc] init];
|
||||||
|
[viewline setBackgroundColor:RGBCOLOR(242, 242, 242)];
|
||||||
|
[viewback addSubview:viewline];
|
||||||
|
[viewline mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.equalTo(viewback);
|
||||||
|
make.top.equalTo(lbname.mas_bottom).offset(20);
|
||||||
|
make.height.offset(1);
|
||||||
|
}];
|
||||||
|
|
||||||
|
NSArray *arr = @[@"取消",@"确认"];
|
||||||
|
float f_w = (UISCREEN_WIDTH-100)/2.0;
|
||||||
|
for(int i = 0; i< arr.count; i++)
|
||||||
|
{
|
||||||
|
UIButton *btitem = [[UIButton alloc] init];
|
||||||
|
[btitem setTitle:arr[i] forState:UIControlStateNormal];
|
||||||
|
[btitem setTitleColor:RGBCOLOR(102, 102, 102) forState:UIControlStateNormal];
|
||||||
|
[btitem.titleLabel setFont:[UIFont systemFontOfSize:14]];
|
||||||
|
if(i==1)
|
||||||
|
{
|
||||||
|
[btitem setTitleColor:RGBCOLOR(249, 73, 73) forState:UIControlStateNormal];
|
||||||
|
[btitem.titleLabel setFont:[UIFont boldSystemFontOfSize:14]];
|
||||||
|
}
|
||||||
|
[viewback addSubview:btitem];
|
||||||
|
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(viewline.mas_bottom);
|
||||||
|
make.left.offset(f_w*i);
|
||||||
|
make.width.offset(f_w);
|
||||||
|
make.height.offset(40);
|
||||||
|
}];
|
||||||
|
[btitem setTag:i];
|
||||||
|
[btitem addTarget:self action:@selector(btAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
if(i==0)
|
||||||
|
{
|
||||||
|
UIView *viewline1 = [[UIView alloc] init];
|
||||||
|
[viewline1 setBackgroundColor:RGBCOLOR(242, 242, 242)];
|
||||||
|
[viewback addSubview:viewline1];
|
||||||
|
[viewline1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.equalTo(btitem.mas_right);
|
||||||
|
make.top.equalTo(btitem);
|
||||||
|
make.bottom.equalTo(viewback);
|
||||||
|
make.width.offset(1);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.bottom.equalTo(viewline).offset(40);
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
-(void)setStrtitle:(NSString *)strtitle
|
||||||
|
{
|
||||||
|
self.lbname.text = strtitle;
|
||||||
|
}
|
||||||
|
-(void)btAction:(UIButton *)sender
|
||||||
|
{
|
||||||
|
if(self.bakcValue)
|
||||||
|
{
|
||||||
|
self.bakcValue(sender.tag);
|
||||||
|
}
|
||||||
|
[self removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
+(void)showInfo:(NSString *)title SelectTag:(nullable void (^)(NSInteger tag))BackSelectTag
|
||||||
|
{
|
||||||
|
NomoAlterView *view = [[NomoAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||||
|
view.strtitle = title;
|
||||||
|
[app.window addSubview:view];
|
||||||
|
[view setBakcValue:^(NSInteger selectTag) {
|
||||||
|
BackSelectTag(selectTag);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,16 @@
|
||||||
|
//
|
||||||
|
// NomoVerbAlterView.h
|
||||||
|
// ProductApp
|
||||||
|
// 按钮突出
|
||||||
|
// Created by 工作 on 2024/6/20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface NomoVerbAlterView : UIView
|
||||||
|
+(void)showTitle:(NSString *)title info:(NSString *)info SelectTag:(nullable void (^)(NSInteger tag))BackSelectTag;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,157 @@
|
||||||
|
//
|
||||||
|
// NomoVerbAlterView.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/6/20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "NomoVerbAlterView.h"
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef void(^NomoVerbAlterViewBack)(NSInteger selectTag);
|
||||||
|
|
||||||
|
@interface NomoVerbAlterView ()
|
||||||
|
@property (nonatomic , strong) UILabel *lbname;
|
||||||
|
@property (nonatomic , strong) UILabel *lbinfo;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strtitle;
|
||||||
|
@property (nonatomic , strong) NSString *strinfo;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NomoVerbAlterViewBack bakcValue;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NomoVerbAlterView
|
||||||
|
|
||||||
|
-(id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
if(self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
[self setBackgroundColor:RGBACOLOR(0, 0, 0, 0.4)];
|
||||||
|
|
||||||
|
UIView *viewback = [[UIView alloc] init];
|
||||||
|
[viewback setBackgroundColor:[UIColor whiteColor]];
|
||||||
|
[self addSubview:viewback];
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(50);
|
||||||
|
make.right.equalTo(self).offset(-50);
|
||||||
|
make.center.equalTo(self);
|
||||||
|
}];
|
||||||
|
[viewback.layer setMasksToBounds:YES];
|
||||||
|
[viewback.layer setCornerRadius:20];
|
||||||
|
|
||||||
|
|
||||||
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
|
[lbname setText:@"是否删除"];
|
||||||
|
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
|
[lbname setTextAlignment:NSTextAlignmentCenter];
|
||||||
|
[lbname setFont:[UIFont boldSystemFontOfSize:18]];
|
||||||
|
[lbname setNumberOfLines:0];
|
||||||
|
[viewback addSubview:lbname];
|
||||||
|
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.offset(20);
|
||||||
|
make.left.offset(20);
|
||||||
|
make.right.equalTo(viewback).offset(-20);
|
||||||
|
}];
|
||||||
|
_lbname = lbname;
|
||||||
|
|
||||||
|
UILabel *lbinfo = [[UILabel alloc] init];
|
||||||
|
[lbinfo setText:@""];
|
||||||
|
[lbinfo setTextColor:RGBCOLOR(177, 177, 177)];
|
||||||
|
[lbinfo setTextAlignment:NSTextAlignmentCenter];
|
||||||
|
[lbinfo setFont:[UIFont systemFontOfSize:12]];
|
||||||
|
[lbinfo setNumberOfLines:0];
|
||||||
|
[viewback addSubview:lbinfo];
|
||||||
|
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(40);
|
||||||
|
make.right.equalTo(viewback).offset(-40);
|
||||||
|
make.top.equalTo(lbname.mas_bottom).offset(10);
|
||||||
|
}];
|
||||||
|
_lbinfo = lbinfo;
|
||||||
|
|
||||||
|
UIButton *btlast = nil;
|
||||||
|
NSArray *arr = @[@"确认",@"取消"];
|
||||||
|
float f_w = (UISCREEN_WIDTH-192)/2.0;
|
||||||
|
for(int i = 0; i< arr.count; i++)
|
||||||
|
{
|
||||||
|
UIButton *btitem = [[UIButton alloc] init];
|
||||||
|
[btitem setTitle:arr[i] forState:UIControlStateNormal];
|
||||||
|
[btitem setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal];
|
||||||
|
[btitem.titleLabel setFont:[UIFont boldSystemFontOfSize:16]];
|
||||||
|
if(i==1)
|
||||||
|
{
|
||||||
|
[btitem setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[btitem.titleLabel setFont:[UIFont boldSystemFontOfSize:16]];
|
||||||
|
[btitem setBackgroundColor:RGBCOLOR(255, 102, 102)];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[btitem.layer setBorderWidth:1];
|
||||||
|
[btitem.layer setBorderColor:RGBCOLOR(216, 216, 216).CGColor];
|
||||||
|
}
|
||||||
|
[btitem.layer setMasksToBounds:YES];
|
||||||
|
[btitem.layer setCornerRadius:15];
|
||||||
|
[viewback addSubview:btitem];
|
||||||
|
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(lbinfo.mas_bottom).offset(20);
|
||||||
|
if(i==1)
|
||||||
|
{
|
||||||
|
make.left.equalTo(viewback.mas_centerX).offset(10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
make.right.equalTo(viewback.mas_centerX).offset(-10);
|
||||||
|
}
|
||||||
|
make.width.offset(f_w);
|
||||||
|
make.height.offset(40);
|
||||||
|
}];
|
||||||
|
[btitem setTag:i];
|
||||||
|
[btitem addTarget:self action:@selector(btAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
btlast = btitem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.bottom.equalTo(btlast).offset(20);
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
-(void)setStrtitle:(NSString *)strtitle
|
||||||
|
{
|
||||||
|
self.lbname.text = strtitle;
|
||||||
|
}
|
||||||
|
-(void)setStrinfo:(NSString *)strinfo
|
||||||
|
{
|
||||||
|
self.lbinfo.text = strinfo;
|
||||||
|
if(strinfo.length>0)
|
||||||
|
{
|
||||||
|
[self.lbinfo mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.lbname.mas_bottom).offset(20);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)btAction:(UIButton *)sender
|
||||||
|
{
|
||||||
|
if(self.bakcValue)
|
||||||
|
{
|
||||||
|
self.bakcValue(sender.tag);
|
||||||
|
}
|
||||||
|
[self removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
+(void)showTitle:(NSString *)title info:(NSString *)info SelectTag:(nullable void (^)(NSInteger tag))BackSelectTag
|
||||||
|
{
|
||||||
|
NomoVerbAlterView *view = [[NomoVerbAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||||
|
view.strtitle = title;
|
||||||
|
view.strinfo = info;
|
||||||
|
[app.window addSubview:view];
|
||||||
|
[view setBakcValue:^(NSInteger selectTag) {
|
||||||
|
BackSelectTag(selectTag);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,16 @@
|
||||||
|
//
|
||||||
|
// TongYiXieYiAlterView.h
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/7/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
typedef void(^TongYiXieYiAlterViewBack)(int type);
|
||||||
|
@interface TongYiXieYiAlterView : UIView
|
||||||
|
+(void)showName:(NSString *)name strinfo:(NSString *)strinfo back:(TongYiXieYiAlterViewBack)backValue;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,136 @@
|
||||||
|
//
|
||||||
|
// TongYiXieYiAlterView.m
|
||||||
|
// ProductApp
|
||||||
|
//
|
||||||
|
// Created by 工作 on 2024/7/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "TongYiXieYiAlterView.h"
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
@interface TongYiXieYiAlterView ()
|
||||||
|
|
||||||
|
@property (nonatomic , strong) UILabel *lbtitle;
|
||||||
|
@property (nonatomic , strong) UILabel *lbinfo;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSString *strtitle;
|
||||||
|
@property (nonatomic , strong) NSString *strinfo;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) TongYiXieYiAlterViewBack backValue;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation TongYiXieYiAlterView
|
||||||
|
|
||||||
|
-(id)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
if(self = [super initWithFrame:frame])
|
||||||
|
{
|
||||||
|
[self setBackgroundColor:RGBACOLOR(0, 0, 0, 0.4)];
|
||||||
|
|
||||||
|
UIView *viewback = [[UIView alloc] init];
|
||||||
|
[viewback setBackgroundColor:[UIColor whiteColor]];
|
||||||
|
[self addSubview:viewback];
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(50);
|
||||||
|
make.right.equalTo(self).offset(-50);
|
||||||
|
make.center.equalTo(self);
|
||||||
|
}];
|
||||||
|
[viewback.layer setMasksToBounds:YES];
|
||||||
|
[viewback.layer setCornerRadius:20];
|
||||||
|
|
||||||
|
UILabel *lbtitle = [[UILabel alloc] init];
|
||||||
|
[lbtitle setText:@"温馨提示"];
|
||||||
|
[lbtitle setTextColor:RGBCOLOR(255, 213, 108)];
|
||||||
|
[lbtitle setTextAlignment:NSTextAlignmentLeft];
|
||||||
|
[lbtitle setFont:[UIFont fontWithName:@"PangMenZhengDao" size:30]];
|
||||||
|
[lbtitle setNumberOfLines:2];
|
||||||
|
[viewback addSubview:lbtitle];
|
||||||
|
[lbtitle mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerX.equalTo(viewback);
|
||||||
|
make.top.offset(23);
|
||||||
|
}];
|
||||||
|
_lbtitle = lbtitle;
|
||||||
|
|
||||||
|
UILabel *lbinfo = [[UILabel alloc] init];
|
||||||
|
[lbinfo setText:@""];
|
||||||
|
[lbinfo setTextColor:RGBCOLOR(107, 107, 107)];
|
||||||
|
[lbinfo setLineBreakMode:NSLineBreakByWordWrapping];
|
||||||
|
[lbinfo setTextAlignment:NSTextAlignmentLeft];
|
||||||
|
[lbinfo setFont:[UIFont systemFontOfSize:14]];
|
||||||
|
[lbinfo setNumberOfLines:0];
|
||||||
|
[viewback addSubview:lbinfo];
|
||||||
|
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(40);
|
||||||
|
make.right.equalTo(viewback).offset(-40);
|
||||||
|
make.top.equalTo(lbtitle.mas_bottom).offset(20);
|
||||||
|
}];
|
||||||
|
_lbinfo = lbinfo;
|
||||||
|
|
||||||
|
|
||||||
|
UIButton *btok = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-210, 40)];
|
||||||
|
[btok setTitle:@"我已查看并同意" forState:UIControlStateNormal];
|
||||||
|
[btok setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[btok.titleLabel setFont:[UIFont systemFontOfSize:16]];
|
||||||
|
[btok.layer setMasksToBounds:YES];
|
||||||
|
[btok.layer setCornerRadius:10];
|
||||||
|
[viewback addSubview:btok];
|
||||||
|
[btok mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.offset(65);
|
||||||
|
make.right.equalTo(viewback).offset(-65);
|
||||||
|
make.top.equalTo(lbinfo.mas_bottom).offset(38);
|
||||||
|
make.height.offset(40);
|
||||||
|
}];
|
||||||
|
[btok addTarget:self action:@selector(okAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[btok.layer setMasksToBounds:YES];
|
||||||
|
[btok.layer setCornerRadius:6];
|
||||||
|
[Tools changedView:btok colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
|
||||||
|
|
||||||
|
UIButton *btdis = [[UIButton alloc] init];
|
||||||
|
[btdis setTitle:@"在考虑一下" forState:UIControlStateNormal];
|
||||||
|
[btdis setTitleColor:RGBCOLOR(102, 102, 102) forState:UIControlStateNormal];
|
||||||
|
[btdis.titleLabel setFont:[UIFont systemFontOfSize:12]];
|
||||||
|
[viewback addSubview:btdis];
|
||||||
|
[btdis mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.equalTo(btok);
|
||||||
|
make.top.equalTo(btok.mas_bottom);
|
||||||
|
make.height.offset(40);
|
||||||
|
}];
|
||||||
|
[btdis addTarget:self action:@selector(disAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.bottom.equalTo(btdis);
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
-(void)setStrtitle:(NSString *)strtitle
|
||||||
|
{
|
||||||
|
self.lbtitle.text = strtitle;
|
||||||
|
}
|
||||||
|
-(void)setStrinfo:(NSString *)strinfo
|
||||||
|
{
|
||||||
|
self.lbinfo.text = strinfo;
|
||||||
|
}
|
||||||
|
-(void)disAction
|
||||||
|
{
|
||||||
|
[self removeFromSuperview];
|
||||||
|
}
|
||||||
|
-(void)okAction
|
||||||
|
{
|
||||||
|
self.backValue(1);
|
||||||
|
[self disAction];
|
||||||
|
}
|
||||||
|
+(void)showName:(NSString *)name strinfo:(NSString *)strinfo back:(TongYiXieYiAlterViewBack)backValue
|
||||||
|
{
|
||||||
|
TongYiXieYiAlterView *view = [[TongYiXieYiAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
|
||||||
|
AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||||
|
view.strtitle = name;
|
||||||
|
view.strinfo = strinfo;
|
||||||
|
view.backValue = backValue;
|
||||||
|
[app.window addSubview:view];
|
||||||
|
}
|
||||||
|
@end
|
|
@ -6,6 +6,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "GongJuListTableViewCell.h"
|
#import "GongJuListTableViewCell.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
#import "NomoAlterView.h"
|
||||||
|
|
||||||
@interface GongJuListTableViewCell ()
|
@interface GongJuListTableViewCell ()
|
||||||
///
|
///
|
||||||
|
@ -90,7 +92,45 @@
|
||||||
|
|
||||||
-(void)collectAction:(UIButton *)sender
|
-(void)collectAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
|
if(self.model.is_fav.intValue == 1)
|
||||||
|
{
|
||||||
|
[NomoAlterView showInfo:@"是否取消收藏" SelectTag:^(NSInteger tag) {
|
||||||
|
if(tag==1)
|
||||||
|
{
|
||||||
|
[self pushData];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self pushData];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)pushData
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
[NetWorkManager requestToolsFavCollectData:self type:[self.model.is_fav isEqualToString:@"true"]?1:0 tool_id:self.model.ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
if([self.model.is_fav isEqualToString:@"true"])
|
||||||
|
{
|
||||||
|
self.model.is_fav = @"false";
|
||||||
|
[self.btcollect setSelected:NO];
|
||||||
|
[HXHud showMessage:@"取消收藏成功" afterDelayType:1];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.model.is_fav = @"true";
|
||||||
|
[self.btcollect setSelected:YES];
|
||||||
|
[HXHud showMessage:@"收藏成功" afterDelayType:1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)setModel:(ToolsListModelDataItems *)model
|
-(void)setModel:(ToolsListModelDataItems *)model
|
||||||
|
@ -100,7 +140,7 @@
|
||||||
self.lbname.text = [Tools isStringnilkong:model.tool_name];
|
self.lbname.text = [Tools isStringnilkong:model.tool_name];
|
||||||
self.lbinfo.text = [Tools isStringnilkong:model.Descriptions];
|
self.lbinfo.text = [Tools isStringnilkong:model.Descriptions];
|
||||||
[self.btcollect setTitle:[Tools isStringnilkong:model.use_count] forState:UIControlStateNormal];
|
[self.btcollect setTitle:[Tools isStringnilkong:model.use_count] forState:UIControlStateNormal];
|
||||||
if(model.is_fav.intValue == 1)
|
if([model.is_fav isEqualToString:@"true"])
|
||||||
{
|
{
|
||||||
[self.btcollect setSelected:YES];
|
[self.btcollect setSelected:YES];
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#import "StartGNViewController.h"
|
#import "StartGNViewController.h"
|
||||||
#import "StartGNTiShiView.h"
|
#import "StartGNTiShiView.h"
|
||||||
#import "StartGNView.h"
|
#import "StartGNView.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface StartGNViewController ()
|
@interface StartGNViewController ()
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#import "TextHeaderCollectionViewCell.h"
|
#import "TextHeaderCollectionViewCell.h"
|
||||||
#import "StartGNViewController.h"
|
#import "StartGNViewController.h"
|
||||||
#import "NetWorkManager.h"
|
#import "NetWorkManager.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface StartNJViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
@interface StartNJViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||||
///
|
///
|
||||||
|
@ -193,7 +194,37 @@
|
||||||
vc.strpid = strpid;
|
vc.strpid = strpid;
|
||||||
vc.strtitle = strtitle;
|
vc.strtitle = strtitle;
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
|
|
||||||
|
|
||||||
|
[self updataUserInfo];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)updataUserInfo
|
||||||
|
{
|
||||||
|
NSMutableArray *arrselect = [NSMutableArray new];
|
||||||
|
for(RoleTreeModelData *modelone in self.arrGetData)
|
||||||
|
{
|
||||||
|
for(RoleTreeModelData *model in modelone.node)
|
||||||
|
{
|
||||||
|
if(model.select)
|
||||||
|
{
|
||||||
|
[arrselect addObject:model];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RoleTreeModelData *modelson = arrselect[arrselect.count/2];
|
||||||
|
NSDictionary *dicuser_stage = [modelson yy_modelToJSONObject];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:dicuser_stage forKey:@"user_stage"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithBool:arrselect.count>1?YES:NO] forKey:@"isAllLevel"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithInt:(int)self.type] forKey:@"identityType"];
|
||||||
|
|
||||||
|
[PublicNetWorkManager requestUserPutData:self.view body:dicpush Callback:^(BOOL state, id _Nullable responseObject, NSString * _Nullable describle) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)btHeaderAction:(UIButton *)sender
|
-(void)btHeaderAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
sender.selected = YES;
|
sender.selected = YES;
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#import <UMCommonLog/UMCommonLogHeaders.h>
|
#import <UMCommonLog/UMCommonLogHeaders.h>
|
||||||
#import <UMLink/UMLink.h>
|
#import <UMLink/UMLink.h>
|
||||||
|
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface StartViewController ()
|
@interface StartViewController ()
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSMutableArray *arrLB;
|
@property (nonatomic , strong) NSMutableArray *arrLB;
|
||||||
|
@ -195,6 +198,10 @@
|
||||||
|
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
[self.view setUserInteractionEnabled:YES];
|
[self.view setUserInteractionEnabled:YES];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:YingDaoYe];
|
||||||
|
///初始化收藏工具
|
||||||
|
[self pushCollectInit];
|
||||||
|
///
|
||||||
if(sender.tag==0)
|
if(sender.tag==0)
|
||||||
{
|
{
|
||||||
StartSFViewController *vc = [[StartSFViewController alloc] init];
|
StartSFViewController *vc = [[StartSFViewController alloc] init];
|
||||||
|
@ -202,13 +209,47 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
[self getNianJiData];
|
||||||
StartGNViewController *vc = [StartGNViewController new];
|
StartGNViewController *vc = [StartGNViewController new];
|
||||||
vc.type = 3;
|
vc.type = 3;
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
-(void)pushCollectInit
|
||||||
|
{
|
||||||
|
[NetWorkManager requestToolsFavInitData:self.view Callback:^(BOOL state, id _Nullable responseObject, NSString * _Nullable describle) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)getNianJiData
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
[NetWorkManager requestRoleTreeData:self.view Callback:^(BOOL state, RoleTreeModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
for(RoleTreeModelData *model in responseObject.data)
|
||||||
|
{
|
||||||
|
if([model.name isEqualToString:@"职场"])
|
||||||
|
{///更新用户信息
|
||||||
|
RoleTreeModelData *modelson = model.node.firstObject;
|
||||||
|
NSDictionary *dicuser_stage = [modelson yy_modelToJSONObject];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:dicuser_stage forKey:@"user_stage"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithBool:NO] forKey:@"isAllLevel"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithInt:3] forKey:@"identityType"];
|
||||||
|
|
||||||
|
[PublicNetWorkManager requestUserPutData:self.view body:dicpush Callback:^(BOOL state, id _Nullable responseObject, NSString * _Nullable describle) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - 数据处理
|
#pragma mark - 数据处理
|
||||||
-(void)network
|
-(void)network
|
||||||
|
@ -346,4 +387,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:YingDaoYe];
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -25,13 +25,6 @@
|
||||||
[self.navigationView setHidden:YES];
|
[self.navigationView setHidden:YES];
|
||||||
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
||||||
|
|
||||||
if(self.ptype==0)
|
|
||||||
{
|
|
||||||
// if(DEBUG)
|
|
||||||
// [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:YingDaoYe];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StartPayView *view = [[StartPayView alloc] init];
|
StartPayView *view = [[StartPayView alloc] init];
|
||||||
[self.view addSubview:view];
|
[self.view addSubview:view];
|
||||||
[view mas_makeConstraints:^(MASConstraintMaker *make) {
|
[view mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
|
|
@ -65,25 +65,6 @@
|
||||||
[viewtime setBackgroundColor:RGBACOLOR(255, 255, 255, 0.5)];
|
[viewtime setBackgroundColor:RGBACOLOR(255, 255, 255, 0.5)];
|
||||||
_viewtime = viewtime;
|
_viewtime = viewtime;
|
||||||
|
|
||||||
////////////更改为新版支付
|
|
||||||
///
|
|
||||||
/*
|
|
||||||
StartPayGoodsPayView *viewpay = [StartPayGoodsPayView new];
|
|
||||||
[self addSubview:viewpay];
|
|
||||||
[viewpay mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.left.right.equalTo(self);
|
|
||||||
make.top.equalTo(viewtime.mas_bottom).offset(20);
|
|
||||||
make.height.offset(120);
|
|
||||||
}];
|
|
||||||
[viewpay setBackSelect:^(NSInteger tag) {
|
|
||||||
///1 weixin 2 alipay
|
|
||||||
|
|
||||||
}];
|
|
||||||
_viewpay = viewpay;
|
|
||||||
|
|
||||||
self.viewpay.arrPay = @[@"weixin",@"alipay"];
|
|
||||||
*/
|
|
||||||
|
|
||||||
///支付
|
///支付
|
||||||
PayPublicView *viewpay = [PayPublicView new];
|
PayPublicView *viewpay = [PayPublicView new];
|
||||||
[self addSubview:viewpay];
|
[self addSubview:viewpay];
|
||||||
|
@ -94,7 +75,7 @@
|
||||||
_viewpay = viewpay;
|
_viewpay = viewpay;
|
||||||
[self drawpay];
|
[self drawpay];
|
||||||
[viewpay setBackValue:^{
|
[viewpay setBackValue:^{
|
||||||
|
self.backSelectGoods(self.modelSelect);
|
||||||
}];
|
}];
|
||||||
[viewpay setBackGoValue:^{
|
[viewpay setBackGoValue:^{
|
||||||
YaoQingViewController *vc = [YaoQingViewController new];
|
YaoQingViewController *vc = [YaoQingViewController new];
|
||||||
|
@ -198,11 +179,11 @@
|
||||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
///做选中操作
|
///做选中操作
|
||||||
for(baseInfoModel *model in self.arrGoods)
|
for(OrderGoodsModelData *model in self.arrGoods)
|
||||||
{
|
{
|
||||||
model.select = NO;
|
model.select = NO;
|
||||||
}
|
}
|
||||||
baseInfoModel *model = self.arrGoods[indexPath.row];
|
OrderGoodsModelData *model = self.arrGoods[indexPath.row];
|
||||||
model.select = YES;
|
model.select = YES;
|
||||||
self.modelSelect = model;
|
self.modelSelect = model;
|
||||||
self.backSelectGoods(self.modelSelect);
|
self.backSelectGoods(self.modelSelect);
|
||||||
|
|
|
@ -12,7 +12,13 @@
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "PublicNetWorkManager.h"
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface StartPayView ()
|
#import "TongYiXieYiAlterView.h"
|
||||||
|
#import "NomoVerbAlterView.h"
|
||||||
|
#import "PayManager.h"
|
||||||
|
#import "VistaInAppPurchaseManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
@interface StartPayView ()<PayManagerDelegate>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) StartPayGoodsView *viewgoods;
|
@property (nonatomic , strong) StartPayGoodsView *viewgoods;
|
||||||
///
|
///
|
||||||
|
@ -26,6 +32,9 @@
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) OrderGoodsModelData *modelSelect;
|
@property (nonatomic , strong) OrderGoodsModelData *modelSelect;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) PayManager *manager;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation StartPayView
|
@implementation StartPayView
|
||||||
|
@ -324,9 +333,29 @@
|
||||||
|
|
||||||
-(void)refBottomShow
|
-(void)refBottomShow
|
||||||
{
|
{
|
||||||
[self.lbjiage setText:@"199元"];
|
[self setXieYiShow];
|
||||||
[self.lbyuanjia setText:@"已优惠999元"];
|
|
||||||
|
float fyhqmoney = 0.0;
|
||||||
|
if(self.viewgoods.viewpay.modelYHQ.coupon_type.intValue == 2)
|
||||||
|
{
|
||||||
|
fyhqmoney = (1-self.viewgoods.viewpay.modelYHQ.coupon_value.floatValue)*self.modelSelect.price.floatValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fyhqmoney = self.viewgoods.viewpay.modelYHQ.coupon_value.floatValue/100;
|
||||||
|
}
|
||||||
|
float fprice = self.modelSelect.price.floatValue-fyhqmoney;
|
||||||
|
if(fprice<0)fprice=0;
|
||||||
|
|
||||||
|
[self.lbjiage setText:[NSString stringWithFormat:@"%@元",[Tools backprice:[NSString stringWithFormat:@"%.2lf",fprice]]]];
|
||||||
self.lbjiage.attributedText = [Tools arrstring:self.lbjiage.text andstart:(int)self.lbjiage.text.length-1 andend:1 andfont:[UIFont boldSystemFontOfSize:14] andcolor:RGBCOLOR(249, 37, 95)];
|
self.lbjiage.attributedText = [Tools arrstring:self.lbjiage.text andstart:(int)self.lbjiage.text.length-1 andend:1 andfont:[UIFont boldSystemFontOfSize:14] andcolor:RGBCOLOR(249, 37, 95)];
|
||||||
|
|
||||||
|
|
||||||
|
float fjian = self.modelSelect.origin_price.intValue-self.modelSelect.price.intValue+fyhqmoney;
|
||||||
|
if(fjian>self.modelSelect.origin_price.floatValue)fjian = self.modelSelect.origin_price.floatValue;
|
||||||
|
|
||||||
|
[self.lbyuanjia setText:[NSString stringWithFormat:@"已优惠%@元",[Tools backprice:[NSString stringWithFormat:@"%.2lf",fjian]]]];
|
||||||
|
|
||||||
}
|
}
|
||||||
-(void)xieyiAction:(UIButton *)sender
|
-(void)xieyiAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
|
@ -340,6 +369,18 @@
|
||||||
{
|
{
|
||||||
_arrGoods = arrGoods;
|
_arrGoods = arrGoods;
|
||||||
self.viewgoods.arrGoods = arrGoods;
|
self.viewgoods.arrGoods = arrGoods;
|
||||||
|
|
||||||
|
if([UserInfoModel PayWXQuanXian]==NO)
|
||||||
|
{
|
||||||
|
NSMutableArray *arr = [NSMutableArray new];
|
||||||
|
for(OrderGoodsModelData *model in arrGoods)
|
||||||
|
{
|
||||||
|
[arr addObject:[Tools isStringnil:model.apple_buy_id]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.manager getGoodsPrice:arr];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -362,9 +403,131 @@
|
||||||
|
|
||||||
-(void)payAction
|
-(void)payAction
|
||||||
{
|
{
|
||||||
[self.viewgoods removeTime];
|
|
||||||
|
|
||||||
|
///需要判断是否需要登录
|
||||||
|
[UserInfoModel pushLoinVC:self.viewController ispush:YES];
|
||||||
|
|
||||||
|
NSString *strc = [[UserInfoModel shareModel].config objectForKey:@"client.agreement.dialog"];
|
||||||
|
if((strc.intValue == 1 || [Tools isStringnil:strc].length==0) && self.btxiyi.selected == NO)
|
||||||
|
{
|
||||||
|
[TongYiXieYiAlterView showName:@"温馨提示" strinfo:[NSString stringWithFormat:@"开通会员之前须先查看并同意%@",self.lbinfo.text] back:^(int type) {
|
||||||
|
self.btxiyi.selected = YES;
|
||||||
|
[self pushData];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(self.btxiyi.selected == NO)
|
||||||
|
{
|
||||||
|
[HXHud showMessage:@"请同意协议" afterDelayType:0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[self pushData];
|
||||||
|
}
|
||||||
|
|
||||||
|
// [self.viewgoods removeTime];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)pushData
|
||||||
|
{
|
||||||
|
NSString *strvalue = [self getpaytype];
|
||||||
|
|
||||||
|
if([strvalue isEqualToString:@"balance"])
|
||||||
|
{
|
||||||
|
[NomoVerbAlterView showTitle:@"提示" info:@"是否使用余额支付" SelectTag:^(NSInteger tag) {
|
||||||
|
if(tag==0)
|
||||||
|
{
|
||||||
|
[self pushPayData];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
[self pushPayData];
|
||||||
|
}
|
||||||
|
-(void)pushPayData
|
||||||
|
{
|
||||||
|
|
||||||
|
NSString *strvalue = [self getpaytype];
|
||||||
|
[UserInfoModel shijianShangBao:0 key:@"client.pay.pay" value:strvalue extra:[self.modelSelect yy_modelToJSONString]];
|
||||||
|
|
||||||
|
NSString *strtempcence = @"center";
|
||||||
|
|
||||||
|
[self.manager creatOrderGoodsid:self.modelSelect.goods_id pay_type:strvalue source:strtempcence extra:@{} applegoodsid:self.modelSelect.apple_buy_id applegoodsNumber:1 coupon:self.viewgoods.viewpay.modelYHQ.ID];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(NSString *)getpaytype
|
||||||
|
{
|
||||||
|
NSString *strvalue = @"";
|
||||||
|
if(self.viewgoods.viewpay.btselect.tag == 1)
|
||||||
|
{
|
||||||
|
strvalue = @"weixin";
|
||||||
|
}
|
||||||
|
else if(self.viewgoods.viewpay.btselect.tag == 2)
|
||||||
|
{
|
||||||
|
strvalue = @"alipay";
|
||||||
|
}
|
||||||
|
else if(self.viewgoods.viewpay.btselect.tag == 10)
|
||||||
|
{
|
||||||
|
strvalue = @"balance";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strvalue = @"apple";
|
||||||
|
}
|
||||||
|
return strvalue;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - payManager
|
||||||
|
#pragma mark - Apple支付
|
||||||
|
///所有商品价格信息
|
||||||
|
-(void)goodsPrice:(NSArray *)product
|
||||||
|
{
|
||||||
|
for(SKProduct *proc in product)
|
||||||
|
{
|
||||||
|
for(OrderGoodsModelData *model in self.arrGoods)
|
||||||
|
{
|
||||||
|
if([model.apple_buy_id isEqualToString:proc.productIdentifier])
|
||||||
|
{
|
||||||
|
NSString *xtr = [Tools backprice:[NSString stringWithFormat:@"%@",proc.price]];
|
||||||
|
model.price = xtr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
self.viewgoods.arrGoods = self.arrGoods;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
-(void)paySuccess
|
||||||
|
{
|
||||||
|
NSString *strvalue = [self getpaytype];
|
||||||
|
NSString *strtempcence = @"center";
|
||||||
|
|
||||||
|
[UserInfoModel shijianShangBao:0 key:@"client.pay.success" value:[NSString stringWithFormat:@"%@:%@",strvalue,strtempcence] extra:self.modelSelect.goods_id];
|
||||||
|
[self.viewController.navigationController popViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
-(void)payCancle
|
||||||
|
{
|
||||||
|
|
||||||
|
NSString *strvalue = [self getpaytype];
|
||||||
|
NSString *strtempcence = @"center";
|
||||||
|
|
||||||
|
[UserInfoModel shijianShangBao:0 key:@"client.pay.cancel" value:[NSString stringWithFormat:@"%@:%@",strvalue,strtempcence] extra:self.modelSelect.goods_id];
|
||||||
|
}
|
||||||
|
-(void)payFaile
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(PayManager *)manager
|
||||||
|
{
|
||||||
|
if(!_manager)
|
||||||
|
{
|
||||||
|
PayManager *manager = [PayManager sharedInstance];
|
||||||
|
[manager setDelegate:self];
|
||||||
|
_manager = manager;
|
||||||
|
}
|
||||||
|
return _manager;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#import "StartZNPPTViewController.h"
|
#import "StartZNPPTViewController.h"
|
||||||
#import "StartZNPPTView.h"
|
#import "StartZNPPTView.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface StartZNPPTViewController ()
|
@interface StartZNPPTViewController ()
|
||||||
|
|
||||||
|
@ -44,8 +44,21 @@
|
||||||
make.left.right.bottom.equalTo(self.view);
|
make.left.right.bottom.equalTo(self.view);
|
||||||
make.top.offset(NavHeight);
|
make.top.offset(NavHeight);
|
||||||
}];
|
}];
|
||||||
|
[view setHidden:YES];
|
||||||
|
|
||||||
|
[LoadAlterView show];
|
||||||
|
[NetWorkManager requestExamplePptData:self.view Callback:^(BOOL state, ExamplePptModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
view.arrdata = responseObject.data.items;
|
||||||
|
[view setHidden:NO];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
///获取粘贴板的文件
|
///获取粘贴板的文件
|
||||||
|
|
|
@ -6,11 +6,12 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "JhtBannerCardView.h"
|
#import "JhtBannerCardView.h"
|
||||||
|
#import "ExamplePptModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTCell : JhtBannerCardView
|
@interface StartZNPPTCell : JhtBannerCardView
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptModelDataItems *model;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
|
|
||||||
|
|
||||||
@interface StartZNPPTCell ()
|
@interface StartZNPPTCell ()
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIImageView *imgvback;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UILabel *lbbiaoti;
|
||||||
@end
|
@end
|
||||||
@implementation StartZNPPTCell
|
@implementation StartZNPPTCell
|
||||||
|
|
||||||
|
@ -27,38 +30,46 @@
|
||||||
[viewback.layer setMasksToBounds:YES];
|
[viewback.layer setMasksToBounds:YES];
|
||||||
[viewback.layer setCornerRadius:6];
|
[viewback.layer setCornerRadius:6];
|
||||||
|
|
||||||
UILabel *lbname = [[UILabel alloc] init];
|
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||||
[lbname setText:@"年终总结"];
|
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
|
||||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
[viewback addSubview:imgvback];
|
||||||
[lbname setTextAlignment:NSTextAlignmentLeft];
|
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
[lbname setFont:[UIFont boldSystemFontOfSize:16]];
|
make.edges.equalTo(viewback);
|
||||||
[viewback addSubview:lbname];
|
|
||||||
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.centerX.equalTo(viewback);
|
|
||||||
make.bottom.equalTo(viewback.mas_centerY).offset(-20);
|
|
||||||
}];
|
}];
|
||||||
|
_imgvback = imgvback;
|
||||||
|
|
||||||
UILabel *lbbt = [[UILabel alloc] init];
|
// UILabel *lbname = [[UILabel alloc] init];
|
||||||
[lbbt setText:@"回顾过去展望未来"];
|
// [lbname setText:@"年终总结"];
|
||||||
[lbbt setTextColor:RGBCOLOR(241, 141, 107)];
|
// [lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
[lbbt setTextAlignment:NSTextAlignmentLeft];
|
// [lbname setTextAlignment:NSTextAlignmentLeft];
|
||||||
[lbbt setFont:[UIFont boldSystemFontOfSize:14]];
|
// [lbname setFont:[UIFont boldSystemFontOfSize:16]];
|
||||||
[viewback addSubview:lbbt];
|
// [viewback addSubview:lbname];
|
||||||
[lbbt mas_makeConstraints:^(MASConstraintMaker *make) {
|
// [lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.centerX.equalTo(lbname);
|
// make.centerX.equalTo(viewback);
|
||||||
make.top.equalTo(lbname.mas_bottom).offset(15);
|
// make.bottom.equalTo(viewback.mas_centerY).offset(-20);
|
||||||
}];
|
// }];
|
||||||
|
//
|
||||||
UILabel *lbren = [[UILabel alloc] init];
|
// UILabel *lbbt = [[UILabel alloc] init];
|
||||||
[lbren setText:@"汇报人:xxx"];
|
// [lbbt setText:@"回顾过去展望未来"];
|
||||||
[lbren setTextColor:RGBCOLOR(51, 51, 51)];
|
// [lbbt setTextColor:RGBCOLOR(241, 141, 107)];
|
||||||
[lbren setTextAlignment:NSTextAlignmentLeft];
|
// [lbbt setTextAlignment:NSTextAlignmentLeft];
|
||||||
[lbren setFont:[UIFont systemFontOfSize:8]];
|
// [lbbt setFont:[UIFont boldSystemFontOfSize:14]];
|
||||||
[viewback addSubview:lbren];
|
// [viewback addSubview:lbbt];
|
||||||
[lbren mas_makeConstraints:^(MASConstraintMaker *make) {
|
// [lbbt mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.centerX.equalTo(lbname);
|
// make.centerX.equalTo(lbname);
|
||||||
make.top.equalTo(lbbt.mas_bottom).offset(20);
|
// make.top.equalTo(lbname.mas_bottom).offset(15);
|
||||||
}];
|
// }];
|
||||||
|
//
|
||||||
|
// UILabel *lbren = [[UILabel alloc] init];
|
||||||
|
// [lbren setText:@"汇报人:xxx"];
|
||||||
|
// [lbren setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
|
// [lbren setTextAlignment:NSTextAlignmentLeft];
|
||||||
|
// [lbren setFont:[UIFont systemFontOfSize:8]];
|
||||||
|
// [viewback addSubview:lbren];
|
||||||
|
// [lbren mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
// make.centerX.equalTo(lbname);
|
||||||
|
// make.top.equalTo(lbbt.mas_bottom).offset(20);
|
||||||
|
// }];
|
||||||
|
|
||||||
UILabel *lbbiaoti = [[UILabel alloc] init];
|
UILabel *lbbiaoti = [[UILabel alloc] init];
|
||||||
[lbbiaoti setText:@"企业工作汇报商务风PPT套装"];
|
[lbbiaoti setText:@"企业工作汇报商务风PPT套装"];
|
||||||
|
@ -70,8 +81,16 @@
|
||||||
make.centerX.equalTo(self);
|
make.centerX.equalTo(self);
|
||||||
make.top.equalTo(viewback.mas_bottom).offset(14);
|
make.top.equalTo(viewback.mas_bottom).offset(14);
|
||||||
}];
|
}];
|
||||||
|
_lbbiaoti = lbbiaoti;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
-(void)setModel:(ExamplePptModelDataItems *)model
|
||||||
|
{
|
||||||
|
_model = model;
|
||||||
|
|
||||||
|
self.lbbiaoti.text = [Tools isStringnilkong:model.name];
|
||||||
|
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:nil];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTView : UIView
|
@interface StartZNPPTView : UIView
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -11,11 +11,19 @@
|
||||||
#import "FSTextView.h"
|
#import "FSTextView.h"
|
||||||
#import "StartZNPPTHUDAlter.h"
|
#import "StartZNPPTHUDAlter.h"
|
||||||
#import "StartZNPPTDaGangViewController.h"
|
#import "StartZNPPTDaGangViewController.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
@interface StartZNPPTView ()<JhtBannerScrollViewDelegate, JhtBannerScrollViewDataSource>
|
@interface StartZNPPTView ()<JhtBannerScrollViewDelegate, JhtBannerScrollViewDataSource>
|
||||||
@property (nonatomic, strong) JhtBannerScrollView *bannerView;
|
@property (nonatomic, strong) JhtBannerScrollView *bannerView;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) FSTextView *textview;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIView *viewItems;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIImageView *imgvico;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UILabel *lbfilename;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation StartZNPPTView
|
@implementation StartZNPPTView
|
||||||
|
@ -114,27 +122,17 @@
|
||||||
make.height.offset(110);
|
make.height.offset(110);
|
||||||
}];
|
}];
|
||||||
textview.text = @"年终总结";
|
textview.text = @"年终总结";
|
||||||
[textview setUserInteractionEnabled:NO];
|
[textview setEditable:NO];
|
||||||
|
_textview = textview;
|
||||||
|
|
||||||
NSArray *arrt = @[@"中文(简体)",@"演讲备注",@"智能配图"];
|
UIView *viewItems = [[UIView alloc] init];
|
||||||
NSArray *arrColor = @[RGBCOLOR(255, 114, 65),RGBCOLOR(255, 170, 16),RGBCOLOR(108, 119, 246)];
|
[view addSubview:viewItems];
|
||||||
for(int i = 0; i < 3; i++)
|
[viewItems mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
{
|
make.left.right.equalTo(view);
|
||||||
UILabel *lbitem = [[UILabel alloc] init];
|
make.top.equalTo(textview.mas_bottom).offset(12);
|
||||||
[lbitem setText:arrt[i]];
|
make.height.offset(24);
|
||||||
[lbitem setTextColor:arrColor[i]];
|
}];
|
||||||
[lbitem setTextAlignment:NSTextAlignmentCenter];
|
_viewItems = viewItems;
|
||||||
[lbitem setFont:[UIFont systemFontOfSize:13]];
|
|
||||||
[lbitem setBackgroundColor:[arrColor[i] colorWithAlphaComponent:0.1]];
|
|
||||||
[lbitem.layer setMasksToBounds:YES];
|
|
||||||
[lbitem.layer setCornerRadius:4];
|
|
||||||
[view addSubview:lbitem];
|
|
||||||
[lbitem mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.size.sizeOffset(CGSizeMake(77, 24));
|
|
||||||
make.top.equalTo(textview.mas_bottom).offset(12);
|
|
||||||
make.left.offset(12+85*i);
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
|
|
||||||
UIView *viewline = [[UIView alloc] init];
|
UIView *viewline = [[UIView alloc] init];
|
||||||
[viewline setBackgroundColor:RGBCOLOR(238, 238, 238)];
|
[viewline setBackgroundColor:RGBCOLOR(238, 238, 238)];
|
||||||
|
@ -184,6 +182,7 @@
|
||||||
make.width.height.offset(33);
|
make.width.height.offset(33);
|
||||||
make.top.offset(0);
|
make.top.offset(0);
|
||||||
}];
|
}];
|
||||||
|
_imgvico = imgvico;
|
||||||
|
|
||||||
UILabel *lbfilename = [[UILabel alloc] init];
|
UILabel *lbfilename = [[UILabel alloc] init];
|
||||||
[lbfilename setText:@"年终总结手稿.txt"];
|
[lbfilename setText:@"年终总结手稿.txt"];
|
||||||
|
@ -196,7 +195,7 @@
|
||||||
make.left.right.equalTo(viewfileson);
|
make.left.right.equalTo(viewfileson);
|
||||||
make.top.equalTo(imgvico.mas_bottom).offset(4);
|
make.top.equalTo(imgvico.mas_bottom).offset(4);
|
||||||
}];
|
}];
|
||||||
|
_lbfilename = lbfilename;
|
||||||
[viewfileson mas_makeConstraints:^(MASConstraintMaker *make) {
|
[viewfileson mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.bottom.equalTo(lbfilename);
|
make.bottom.equalTo(lbfilename);
|
||||||
}];
|
}];
|
||||||
|
@ -228,6 +227,41 @@
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)drawItemsArr:(NSArray *)arrt
|
||||||
|
{
|
||||||
|
for(UIView *view in self.viewItems.subviews)
|
||||||
|
{
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
NSArray *arrColor = @[RGBCOLOR(255, 114, 65),RGBCOLOR(255, 170, 16),RGBCOLOR(108, 119, 246)];
|
||||||
|
for(int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
if(i>=arrt.count||i>=arrColor.count)break;
|
||||||
|
UILabel *lbitem = [[UILabel alloc] init];
|
||||||
|
[lbitem setText:arrt[i]];
|
||||||
|
[lbitem setTextColor:arrColor[i]];
|
||||||
|
[lbitem setTextAlignment:NSTextAlignmentCenter];
|
||||||
|
[lbitem setFont:[UIFont systemFontOfSize:13]];
|
||||||
|
[lbitem setBackgroundColor:[arrColor[i] colorWithAlphaComponent:0.1]];
|
||||||
|
[lbitem.layer setMasksToBounds:YES];
|
||||||
|
[lbitem.layer setCornerRadius:4];
|
||||||
|
[self.viewItems addSubview:lbitem];
|
||||||
|
[lbitem mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.size.sizeOffset(CGSizeMake(77, 24));
|
||||||
|
make.top.offset(0);
|
||||||
|
make.left.offset(12+85*i);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)setArrdata:(NSArray *)arrdata
|
||||||
|
{
|
||||||
|
_arrdata = arrdata;
|
||||||
|
if(arrdata.count==0)return;
|
||||||
|
[self showViewInfoModel:self.arrdata[0]];
|
||||||
|
[self.bannerView reloadData];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)fileAction
|
-(void)fileAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -236,19 +270,36 @@
|
||||||
-(void)nextAction
|
-(void)nextAction
|
||||||
{
|
{
|
||||||
[StartZNPPTHUDAlter show];
|
[StartZNPPTHUDAlter show];
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
ExamplePptModelDataItems *model = self.arrdata[self.bannerView.currentIndex];
|
||||||
|
[NetWorkManager requestExamplePptDetailData:self ID:model.ID Callback:^(BOOL state, ExamplePptDetailModel *responseObject, NSString * _Nullable describle) {
|
||||||
[StartZNPPTHUDAlter dismis];
|
[StartZNPPTHUDAlter dismis];
|
||||||
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
|
if(state)
|
||||||
vc.isyindao = YES;
|
{
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
|
||||||
});
|
vc.isyindao = YES;
|
||||||
|
vc.modelDetail = responseObject.data;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)showViewInfoModel:(ExamplePptModelDataItems *)model
|
||||||
|
{
|
||||||
|
[self drawItemsArr:model.config.tag];
|
||||||
|
self.textview.text = model.config.query;
|
||||||
|
self.lbfilename.text = [Tools isStringnilkong:model.config.file];
|
||||||
|
self.imgvico.image = [UIImage imageNamed:[NSString stringWithFormat:@"yd_%@",model.config.file_type]];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - JhtBannerScrollViewDataSource
|
#pragma mark - JhtBannerScrollViewDataSource
|
||||||
/** 显示cardView 个数 */
|
/** 显示cardView 个数 */
|
||||||
- (NSInteger)numberOfCardViewInBannerView:(JhtBannerScrollView *)bannerView
|
- (NSInteger)numberOfCardViewInBannerView:(JhtBannerScrollView *)bannerView
|
||||||
{
|
{
|
||||||
return 5;
|
return self.arrdata.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 单个cardView */
|
/** 单个cardView */
|
||||||
|
@ -259,7 +310,7 @@
|
||||||
cardView = [[StartZNPPTCell alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH*0.8, 180)];
|
cardView = [[StartZNPPTCell alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH*0.8, 180)];
|
||||||
cardView.tag = index;
|
cardView.tag = index;
|
||||||
}
|
}
|
||||||
|
cardView.model = self.arrdata[index];
|
||||||
|
|
||||||
return cardView;
|
return cardView;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +324,8 @@
|
||||||
/** 滚动到了某一个cardView */
|
/** 滚动到了某一个cardView */
|
||||||
- (void)bannerView:(JhtBannerScrollView *)bannerView didScrollToCardViewWithIndex:(NSInteger)index
|
- (void)bannerView:(JhtBannerScrollView *)bannerView didScrollToCardViewWithIndex:(NSInteger)index
|
||||||
{
|
{
|
||||||
|
ExamplePptModelDataItems *model = self.arrdata[index];
|
||||||
|
[self showViewInfoModel:model];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 点击了第几个cardView
|
/** 点击了第几个cardView
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTDaGangViewController : BaseViewController
|
@interface StartZNPPTDaGangViewController : BaseViewController
|
||||||
@property (nonatomic , assign) BOOL isyindao;
|
@property (nonatomic , assign) BOOL isyindao;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelData *modelDetail;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
make.top.offset(NavHeight);
|
make.top.offset(NavHeight);
|
||||||
}];
|
}];
|
||||||
view.isyindao = self.isyindao;
|
view.isyindao = self.isyindao;
|
||||||
|
view.modelDetail = self.modelDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTDaGangSonTableViewCell : UITableViewCell
|
@interface StartZNPPTDaGangSonTableViewCell : UITableViewCell
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelDataResultOutlineChaptersItem *model;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#import "StartZNPPTDaGangSonTableViewCell.h"
|
#import "StartZNPPTDaGangSonTableViewCell.h"
|
||||||
|
|
||||||
@interface StartZNPPTDaGangSonTableViewCell ()
|
@interface StartZNPPTDaGangSonTableViewCell ()<UITextFieldDelegate>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UITextField *fieldname;
|
@property (nonatomic , strong) UITextField *fieldname;
|
||||||
///
|
///
|
||||||
|
@ -93,9 +93,26 @@
|
||||||
make.height.offset(30);
|
make.height.offset(30);
|
||||||
make.width.offset(35);
|
make.width.offset(35);
|
||||||
}];
|
}];
|
||||||
|
[btedit addTarget:self action:@selector(editFieldAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
_btedit = btedit;
|
_btedit = btedit;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
-(void)setModel:(ExamplePptDetailModelDataResultOutlineChaptersItem *)model
|
||||||
|
{
|
||||||
|
_model = model;
|
||||||
|
[self.fieldname setUserInteractionEnabled:NO];
|
||||||
|
self.fieldname.text = model.chapterTitle;
|
||||||
|
}
|
||||||
|
-(void)editFieldAction
|
||||||
|
{
|
||||||
|
[self.fieldname setDelegate:self];
|
||||||
|
[self.fieldname setUserInteractionEnabled:YES];
|
||||||
|
[self.fieldname becomeFirstResponder];
|
||||||
|
}
|
||||||
|
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField
|
||||||
|
{
|
||||||
|
self.model.chapterTitle = textField.text;
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -6,14 +6,15 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTDaGangTableViewCell : UITableViewCell
|
@interface StartZNPPTDaGangTableViewCell : UITableViewCell
|
||||||
///0上面 1下面 2全部
|
///0上面 1下面 2全部
|
||||||
@property (nonatomic , assign) NSInteger typeline;
|
@property (nonatomic , assign) NSInteger typeline;
|
||||||
|
@property (nonatomic , assign) NSInteger irow;
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) baseInfoModel *model;
|
@property (nonatomic , strong) ExamplePptDetailModelDataResultOutlineChapters *model;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#import "UITableView+MoveCell.h"
|
#import "UITableView+MoveCell.h"
|
||||||
#import "StartZNPPTDaGangSonTableViewCell.h"
|
#import "StartZNPPTDaGangSonTableViewCell.h"
|
||||||
|
|
||||||
@interface StartZNPPTDaGangTableViewCell ()<UITableViewDelegate,UITableViewDataSource>
|
@interface StartZNPPTDaGangTableViewCell ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UIView *viewback;
|
@property (nonatomic , strong) UIView *viewback;
|
||||||
///
|
///
|
||||||
|
@ -127,6 +127,7 @@
|
||||||
make.height.offset(30);
|
make.height.offset(30);
|
||||||
make.width.offset(35);
|
make.width.offset(35);
|
||||||
}];
|
}];
|
||||||
|
[btedit addTarget:self action:@selector(editFieldAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
_btedit = btedit;
|
_btedit = btedit;
|
||||||
|
|
||||||
UITableView *tableView = [[UITableView alloc] init];
|
UITableView *tableView = [[UITableView alloc] init];
|
||||||
|
@ -145,11 +146,20 @@
|
||||||
__weak typeof(self) weakSelf = self;
|
__weak typeof(self) weakSelf = self;
|
||||||
[tableView setDataWithArray:self.arrData withBlock:^(NSMutableArray *newArray) {
|
[tableView setDataWithArray:self.arrData withBlock:^(NSMutableArray *newArray) {
|
||||||
weakSelf.arrData = newArray;
|
weakSelf.arrData = newArray;
|
||||||
|
self.model.chapterContents = newArray;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)editFieldAction
|
||||||
|
{
|
||||||
|
[self.fieldtitle setDelegate:self];
|
||||||
|
[self.fieldtitle setUserInteractionEnabled:YES];
|
||||||
|
[self.fieldtitle becomeFirstResponder];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)setTypeline:(NSInteger)typeline
|
-(void)setTypeline:(NSInteger)typeline
|
||||||
{
|
{
|
||||||
_typeline = typeline;
|
_typeline = typeline;
|
||||||
|
@ -185,20 +195,43 @@
|
||||||
[self.viewline setHidden:YES];
|
[self.viewline setHidden:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-(void)setModel:(baseInfoModel *)model
|
-(void)setModel:(ExamplePptDetailModelDataResultOutlineChapters *)model
|
||||||
{
|
{
|
||||||
_model = model;
|
_model = model;
|
||||||
[self.arrData removeAllObjects];
|
[self.fieldtitle setUserInteractionEnabled:NO];
|
||||||
if(model.arrvalue)
|
self.fieldtitle.text = model.chapterTitle;
|
||||||
|
if(model.isTitle)
|
||||||
{
|
{
|
||||||
[self.arrData addObjectsFromArray:model.arrvalue];
|
if(self.irow==1)
|
||||||
|
{
|
||||||
|
self.lbname.text = @"副标题";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.lbname.text = @"主标题";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.lbname.text = [NSString stringWithFormat:@"章节%ld",self.irow+1];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[self.arrData removeAllObjects];
|
||||||
|
if(model.chapterContents)
|
||||||
|
{
|
||||||
|
[self.arrData addObjectsFromArray:model.chapterContents];
|
||||||
self.tableView.dataArray = self.arrData;
|
self.tableView.dataArray = self.arrData;
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField
|
||||||
|
{
|
||||||
|
self.model.chapterTitle = textField.text;
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
#pragma mark - UITableView
|
#pragma mark - UITableView
|
||||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
|
@ -214,7 +247,7 @@
|
||||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||||
[cell setBackgroundColor:[UIColor clearColor]];
|
[cell setBackgroundColor:[UIColor clearColor]];
|
||||||
}
|
}
|
||||||
|
cell.model = self.arrData[indexPath.row];
|
||||||
|
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTDaGangAlterView : UIView
|
@interface StartZNPPTDaGangAlterView : UIView
|
||||||
+(void)show;
|
+(void)show;
|
||||||
|
+(void)setShowValue:(float)value;
|
||||||
+(void)dismis;
|
+(void)dismis;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ static StartZNPPTDaGangAlterView *viewShow;
|
||||||
make.height.offset(22);
|
make.height.offset(22);
|
||||||
make.top.equalTo(viewline.mas_bottom).offset(44);
|
make.top.equalTo(viewline.mas_bottom).offset(44);
|
||||||
}];
|
}];
|
||||||
viewjd.fblv = 0.5;
|
viewjd.fblv = 0.0;
|
||||||
_viewjd = viewjd;
|
_viewjd = viewjd;
|
||||||
|
|
||||||
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
@ -96,6 +96,10 @@ static StartZNPPTDaGangAlterView *viewShow;
|
||||||
[appde.window addSubview:view];
|
[appde.window addSubview:view];
|
||||||
viewShow = view;
|
viewShow = view;
|
||||||
}
|
}
|
||||||
|
+(void)setShowValue:(float)value
|
||||||
|
{
|
||||||
|
viewShow.viewjd.fblv = value;
|
||||||
|
}
|
||||||
+(void)dismis
|
+(void)dismis
|
||||||
{
|
{
|
||||||
if(viewShow)
|
if(viewShow)
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTDaGangView : UIView
|
@interface StartZNPPTDaGangView : UIView
|
||||||
@property (nonatomic , assign) BOOL isyindao;
|
@property (nonatomic , assign) BOOL isyindao;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelData *modelDetail;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
}];
|
}];
|
||||||
|
|
||||||
///
|
///
|
||||||
[self setnomoData];
|
|
||||||
__weak typeof(self) weakSelf = self;
|
__weak typeof(self) weakSelf = self;
|
||||||
[tableView setDataWithArray:self.arrTitle withBlock:^(NSMutableArray *newArray) {
|
[tableView setDataWithArray:self.arrTitle withBlock:^(NSMutableArray *newArray) {
|
||||||
weakSelf.arrTitle = newArray;
|
weakSelf.arrTitle = newArray;
|
||||||
|
@ -91,6 +91,7 @@
|
||||||
///
|
///
|
||||||
[tableViewinfo setDataWithArray:self.arrContent withBlock:^(NSMutableArray *newArray) {
|
[tableViewinfo setDataWithArray:self.arrContent withBlock:^(NSMutableArray *newArray) {
|
||||||
weakSelf.arrContent = newArray;
|
weakSelf.arrContent = newArray;
|
||||||
|
self.modelDetail.result.outline.chapters = newArray;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
UIButton *btnext = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 144, 46)];
|
UIButton *btnext = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 144, 46)];
|
||||||
|
@ -114,14 +115,51 @@
|
||||||
|
|
||||||
-(void)nextAction
|
-(void)nextAction
|
||||||
{
|
{
|
||||||
|
for(int i = 0 ; i < self.arrTitle.count; i++)
|
||||||
|
{
|
||||||
|
ExamplePptDetailModelDataResultOutlineChapters *model = self.arrTitle[i];
|
||||||
|
if(i==1)
|
||||||
|
{
|
||||||
|
self.modelDetail.result.outline.subTitle = model.chapterTitle;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.modelDetail.result.outline.title = model.chapterTitle;
|
||||||
|
}
|
||||||
|
}
|
||||||
[StartZNPPTDaGangAlterView show];
|
[StartZNPPTDaGangAlterView show];
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
if(self.isyindao)
|
||||||
[StartZNPPTDaGangAlterView dismis];
|
{
|
||||||
StartZNPPTYuLanViewController *vc = [StartZNPPTYuLanViewController new];
|
__block float fvalue = 0.0;
|
||||||
vc.isyindao = self.isyindao;
|
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[NSTimer scheduledTimerWithTimeInterval:0.01 repeats:YES block:^(NSTimer * _Nonnull timer) {
|
||||||
});
|
fvalue = (fvalue*100+0.2)/100;
|
||||||
|
if(fvalue<=1)
|
||||||
|
{
|
||||||
|
[StartZNPPTDaGangAlterView setShowValue:fvalue];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[timer invalidate];
|
||||||
|
[StartZNPPTDaGangAlterView dismis];
|
||||||
|
StartZNPPTYuLanViewController *vc = [StartZNPPTYuLanViewController new];
|
||||||
|
vc.isyindao = self.isyindao;
|
||||||
|
vc.modelDetail = self.modelDetail;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-(void)setModelDetail:(ExamplePptDetailModelData *)modelDetail
|
||||||
|
{
|
||||||
|
_modelDetail = modelDetail;
|
||||||
|
[self setnomoData];
|
||||||
|
[self.tableView reloadData];
|
||||||
|
[self.tableViewinfo reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)setnomoData
|
-(void)setnomoData
|
||||||
|
@ -129,26 +167,26 @@
|
||||||
self.arrTitle = [NSMutableArray new];
|
self.arrTitle = [NSMutableArray new];
|
||||||
for(int i = 0 ; i < 2; i++)
|
for(int i = 0 ; i < 2; i++)
|
||||||
{
|
{
|
||||||
baseInfoModel *model = [baseInfoModel new];
|
ExamplePptDetailModelDataResultOutlineChapters *model = [ExamplePptDetailModelDataResultOutlineChapters new];
|
||||||
|
model.chapterTitle = self.modelDetail.result.outline.title;
|
||||||
|
if(i==1)
|
||||||
|
{
|
||||||
|
model.chapterTitle = self.modelDetail.result.outline.subTitle;
|
||||||
|
}
|
||||||
|
model.isTitle = YES;
|
||||||
[self.arrTitle addObject:model];
|
[self.arrTitle addObject:model];
|
||||||
}
|
}
|
||||||
|
self.tableView.dataArray = self.arrTitle;
|
||||||
|
|
||||||
float fheight = 0;
|
float fheight = 0;
|
||||||
self.arrContent = [NSMutableArray new];
|
self.arrContent = [NSMutableArray new];
|
||||||
for(int i = 0 ; i < 4; i++)
|
for(ExamplePptDetailModelDataResultOutlineChapters *modelChapters in self.modelDetail.result.outline.chapters)
|
||||||
{
|
{
|
||||||
fheight+=47;
|
fheight+=47;
|
||||||
baseInfoModel *model = [baseInfoModel new];
|
fheight+=47*modelChapters.chapterContents.count;
|
||||||
NSMutableArray *arrson = [NSMutableArray new];
|
|
||||||
for(int j = 0 ; j < 4; j++)
|
|
||||||
{
|
|
||||||
[arrson addObject:[NSString stringWithFormat:@"%d",j]];
|
|
||||||
fheight+=47;
|
|
||||||
}
|
|
||||||
model.arrvalue = arrson;
|
|
||||||
[self.arrContent addObject:model];
|
|
||||||
}
|
}
|
||||||
|
[self.arrContent addObjectsFromArray:self.modelDetail.result.outline.chapters];
|
||||||
|
self.tableViewinfo.dataArray = self.arrContent;
|
||||||
|
|
||||||
[self.tableViewinfo mas_updateConstraints:^(MASConstraintMaker *make) {
|
[self.tableViewinfo mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||||
make.height.offset(fheight+10);
|
make.height.offset(fheight+10);
|
||||||
|
@ -193,10 +231,10 @@
|
||||||
if(arr.count==1)
|
if(arr.count==1)
|
||||||
{
|
{
|
||||||
cell.typeline = 3;
|
cell.typeline = 3;
|
||||||
baseInfoModel *model = arr[indexPath.row];
|
ExamplePptDetailModelDataResultOutlineChapters *model = arr[indexPath.row];
|
||||||
if(model.arrvalue!=nil)
|
if(model.chapterContents!=nil)
|
||||||
{
|
{
|
||||||
if(model.arrvalue.count>0)
|
if(model.chapterContents.count>0)
|
||||||
{
|
{
|
||||||
cell.typeline = 1;
|
cell.typeline = 1;
|
||||||
}
|
}
|
||||||
|
@ -211,10 +249,10 @@
|
||||||
else if(indexPath.row==arr.count-1)
|
else if(indexPath.row==arr.count-1)
|
||||||
{
|
{
|
||||||
cell.typeline = 0;
|
cell.typeline = 0;
|
||||||
baseInfoModel *model = arr[indexPath.row];
|
ExamplePptDetailModelDataResultOutlineChapters *model = arr[indexPath.row];
|
||||||
if(model.arrvalue!=nil)
|
if(model.chapterContents!=nil)
|
||||||
{
|
{
|
||||||
if(model.arrvalue.count>0)
|
if(model.chapterContents.count>0)
|
||||||
{
|
{
|
||||||
cell.typeline = 2;
|
cell.typeline = 2;
|
||||||
}
|
}
|
||||||
|
@ -225,12 +263,13 @@
|
||||||
cell.typeline = 2;
|
cell.typeline = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cell.irow = indexPath.row;
|
||||||
cell.model = arr[indexPath.row];
|
cell.model = arr[indexPath.row];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
baseInfoModel *model;
|
ExamplePptDetailModelDataResultOutlineChapters *model;
|
||||||
if(tableView.tag==1)
|
if(tableView.tag==1)
|
||||||
{
|
{
|
||||||
model = self.arrContent[indexPath.row];
|
model = self.arrContent[indexPath.row];
|
||||||
|
@ -240,9 +279,9 @@
|
||||||
model = self.arrTitle[indexPath.row];
|
model = self.arrTitle[indexPath.row];
|
||||||
}
|
}
|
||||||
float fheigh = 47;
|
float fheigh = 47;
|
||||||
if(model.arrvalue!=nil)
|
if(model.chapterContents!=nil)
|
||||||
{
|
{
|
||||||
fheigh+=model.arrvalue.count*47;
|
fheigh+=model.chapterContents.count*47;
|
||||||
}
|
}
|
||||||
return fheigh;
|
return fheigh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "BaseViewController.h"
|
#import "BaseViewController.h"
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface StartZNPPTYuLanViewController : BaseViewController
|
@interface StartZNPPTYuLanViewController : BaseViewController
|
||||||
@property (nonatomic , assign) BOOL isyindao;
|
@property (nonatomic , assign) BOOL isyindao;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelData *modelDetail;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#import "StartZNPPTYuLanViewController.h"
|
#import "StartZNPPTYuLanViewController.h"
|
||||||
#import "StartZNPPTYuLanTableViewCell.h"
|
#import "StartZNPPTYuLanTableViewCell.h"
|
||||||
#import "StartPayViewController.h"
|
#import "StartPayViewController.h"
|
||||||
|
#import "XLPhotoBrowser.h"
|
||||||
|
|
||||||
@interface StartZNPPTYuLanViewController ()<UITableViewDelegate,UITableViewDataSource>
|
@interface StartZNPPTYuLanViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||||
///
|
///
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
[self.navigationView.backButton setHidden:YES];
|
[self.navigationView.backButton setHidden:YES];
|
||||||
[self drawTopView];
|
[self drawTopView];
|
||||||
|
|
||||||
UITableView *tableView = [[UITableView alloc] init];
|
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||||
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
|
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
|
||||||
[tableView setBackgroundColor:[UIColor clearColor]];
|
[tableView setBackgroundColor:[UIColor clearColor]];
|
||||||
[tableView setDelegate:self];
|
[tableView setDelegate:self];
|
||||||
|
@ -48,7 +49,7 @@
|
||||||
-(void)drawTopView
|
-(void)drawTopView
|
||||||
{
|
{
|
||||||
UILabel *lbname = [[UILabel alloc] init];
|
UILabel *lbname = [[UILabel alloc] init];
|
||||||
[lbname setText:@"演讲文稿 31页"];
|
[lbname setText:[NSString stringWithFormat:@"演讲文稿 %ld页",self.modelDetail.result.images.count]];
|
||||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||||
[lbname setTextAlignment:NSTextAlignmentLeft];
|
[lbname setTextAlignment:NSTextAlignmentLeft];
|
||||||
[lbname setFont:[UIFont systemFontOfSize:14]];
|
[lbname setFont:[UIFont systemFontOfSize:14]];
|
||||||
|
@ -86,11 +87,20 @@
|
||||||
StartPayViewController *vc = [StartPayViewController new];
|
StartPayViewController *vc = [StartPayViewController new];
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
|
-(void)showImages:(NSInteger)irow
|
||||||
|
{
|
||||||
|
NSMutableArray *arrtemp = [NSMutableArray new];
|
||||||
|
for(ExamplePptDetailModelDataResultImages *model in self.modelDetail.result.images)
|
||||||
|
{
|
||||||
|
[arrtemp addObject:[Tools isStringnil:model.url]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[XLPhotoBrowser showPhotoBrowserWithImages:arrtemp currentImageIndex:irow].pageControlStyle = XLPhotoBrowserPageControlStyleNone;
|
||||||
|
}
|
||||||
#pragma mark - UITableView
|
#pragma mark - UITableView
|
||||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
return 10;
|
return self.modelDetail.result.images.count;
|
||||||
}
|
}
|
||||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
|
@ -102,7 +112,11 @@
|
||||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||||
[cell setBackgroundColor:[UIColor clearColor]];
|
[cell setBackgroundColor:[UIColor clearColor]];
|
||||||
}
|
}
|
||||||
|
cell.irow = indexPath.row;
|
||||||
|
cell.model = self.modelDetail.result.images[indexPath.row];
|
||||||
|
[cell setBackValue:^(NSInteger irow) {
|
||||||
|
[self showImages:irow];
|
||||||
|
}];
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||||
|
@ -115,7 +129,10 @@
|
||||||
}
|
}
|
||||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
return 284;
|
float fheight = (UISCREEN_WIDTH-32)*180/343+35;
|
||||||
|
ExamplePptDetailModelDataResultImages *model = self.modelDetail.result.images[indexPath.row];
|
||||||
|
fheight+=[Tools getLabelHeightWithText:model.desc width:(UISCREEN_WIDTH - 52) font:12 linHeight:5]+1;
|
||||||
|
return fheight;
|
||||||
}
|
}
|
||||||
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,11 +6,16 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ExamplePptDetailModel.h"
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
typedef void(^StartZNPPTYuLanTableViewCellBack)(NSInteger irow);
|
||||||
@interface StartZNPPTYuLanTableViewCell : UITableViewCell
|
@interface StartZNPPTYuLanTableViewCell : UITableViewCell
|
||||||
|
@property (nonatomic , assign) NSInteger irow;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) ExamplePptDetailModelDataResultImages *model;
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) StartZNPPTYuLanTableViewCellBack backValue;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -37,15 +37,17 @@
|
||||||
|
|
||||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||||
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
|
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
|
||||||
[imgvback setImage:[UIImage imageNamed:@"yd_zy_0"]];
|
|
||||||
[viewback addSubview:imgvback];
|
[viewback addSubview:imgvback];
|
||||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.top.right.equalTo(viewback);
|
make.left.top.right.equalTo(viewback);
|
||||||
make.height.offset(160);
|
make.height.offset((UISCREEN_WIDTH-32)*180/343);
|
||||||
}];
|
}];
|
||||||
[imgvback.layer setMasksToBounds:YES];
|
[imgvback.layer setMasksToBounds:YES];
|
||||||
[imgvback.layer setCornerRadius:6];
|
[imgvback.layer setCornerRadius:6];
|
||||||
_imgvback = imgvback;
|
_imgvback = imgvback;
|
||||||
|
[imgvback setUserInteractionEnabled:YES];
|
||||||
|
UITapGestureRecognizer *tapimg = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imageAction)];
|
||||||
|
[imgvback addGestureRecognizer:tapimg];
|
||||||
|
|
||||||
UILabel *lbpage = [[UILabel alloc] init];
|
UILabel *lbpage = [[UILabel alloc] init];
|
||||||
[lbpage setText:@"01"];
|
[lbpage setText:@"01"];
|
||||||
|
@ -75,17 +77,45 @@
|
||||||
}];
|
}];
|
||||||
_lbcontent = lbcontent;
|
_lbcontent = lbcontent;
|
||||||
|
|
||||||
NSString *str = @"尊敬的各位同事,随着年末的临近,我们共同走过了又一季的历程。今天,我们将以“年终总结”为主题,回顾这一年来的辛勤耕耘与辉煌成就。让我们共同聚焦于过去的成就、未来的规划,以及持续的进步。接下来,请各位与我一同翻开这一页,开启我们的年度回顾之旅。";
|
// NSString *str = @"尊敬的各位同事,随着年末的临近,我们共同走过了又一季的历程。今天,我们将以“年终总结”为主题,回顾这一年来的辛勤耕耘与辉煌成就。让我们共同聚焦于过去的成就、未来的规划,以及持续的进步。接下来,请各位与我一同翻开这一页,开启我们的年度回顾之旅。";
|
||||||
///行间距
|
// ///行间距
|
||||||
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
// NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
||||||
style.lineSpacing = 5;
|
// style.lineSpacing = 5;
|
||||||
style.lineBreakMode = NSLineBreakByWordWrapping;
|
// style.lineBreakMode = NSLineBreakByWordWrapping;
|
||||||
style.alignment = NSTextAlignmentCenter;
|
// style.alignment = NSTextAlignmentCenter;
|
||||||
|
//
|
||||||
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
|
// NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
|
||||||
[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
|
// [attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
|
||||||
lbcontent.attributedText = attrString;
|
// lbcontent.attributedText = attrString;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
-(void)setModel:(ExamplePptDetailModelDataResultImages *)model
|
||||||
|
{
|
||||||
|
self.lbpage.text = [NSString stringWithFormat:@"%ld",self.irow+1];
|
||||||
|
if(self.irow<9)
|
||||||
|
{
|
||||||
|
self.lbpage.text = [NSString stringWithFormat:@"0%ld",self.irow+1];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:model.url] placeholderImage:nil];
|
||||||
|
|
||||||
|
NSString *str = model.desc;
|
||||||
|
///行间距
|
||||||
|
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
||||||
|
style.lineSpacing = 5;
|
||||||
|
style.lineBreakMode = NSLineBreakByWordWrapping;
|
||||||
|
style.alignment = NSTextAlignmentCenter;
|
||||||
|
|
||||||
|
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:str];
|
||||||
|
[attrString addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, str.length)];
|
||||||
|
self.lbcontent.attributedText = attrString;
|
||||||
|
}
|
||||||
|
-(void)imageAction
|
||||||
|
{
|
||||||
|
if(self.backValue)
|
||||||
|
{
|
||||||
|
self.backValue(self.irow);
|
||||||
|
}
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -183,6 +183,7 @@
|
||||||
}
|
}
|
||||||
-(void)setIsshiyong:(BOOL)isshiyong
|
-(void)setIsshiyong:(BOOL)isshiyong
|
||||||
{
|
{
|
||||||
|
_isshiyong = isshiyong;
|
||||||
if(!isshiyong)
|
if(!isshiyong)
|
||||||
{
|
{
|
||||||
[self.btpigai setTitle:@"改写润色" forState:UIControlStateNormal];
|
[self.btpigai setTitle:@"改写润色" forState:UIControlStateNormal];
|
||||||
|
|
|
@ -18,12 +18,19 @@
|
||||||
#import "ShouYeZCPPTTableViewCell.h"
|
#import "ShouYeZCPPTTableViewCell.h"
|
||||||
#import "ShouYeZCXZTableViewCell.h"
|
#import "ShouYeZCXZTableViewCell.h"
|
||||||
#import "ShouYeLiShiJiLuViewController.h"
|
#import "ShouYeLiShiJiLuViewController.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
|
||||||
|
|
||||||
@interface ShouYeViewController ()<UITableViewDelegate,UITableViewDataSource>
|
@interface ShouYeViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||||
///
|
///
|
||||||
|
@property (nonatomic , strong) UIButton *btnianji;
|
||||||
|
///
|
||||||
@property (nonatomic , strong) UITableView *tableView ;
|
@property (nonatomic , strong) UITableView *tableView ;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrTools;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ShouYeViewController
|
@implementation ShouYeViewController
|
||||||
|
@ -37,6 +44,8 @@
|
||||||
{
|
{
|
||||||
[self.tableView reloadData];
|
[self.tableView reloadData];
|
||||||
}
|
}
|
||||||
|
[self updateBtShow];
|
||||||
|
[self getTools];
|
||||||
}
|
}
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
@ -60,6 +69,9 @@
|
||||||
make.top.offset(NavHeight+15);
|
make.top.offset(NavHeight+15);
|
||||||
}];
|
}];
|
||||||
_tableView = tableView;
|
_tableView = tableView;
|
||||||
|
|
||||||
|
[self getUserData];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)drawTopView
|
-(void)drawTopView
|
||||||
|
@ -87,6 +99,7 @@
|
||||||
[btnianji setIconInRightWithSpacing:6];
|
[btnianji setIconInRightWithSpacing:6];
|
||||||
[btnianji setTag:0];
|
[btnianji setTag:0];
|
||||||
[btnianji addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside];
|
[btnianji addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
_btnianji = btnianji;
|
||||||
|
|
||||||
UIButton *btlishi = [[UIButton alloc] init];
|
UIButton *btlishi = [[UIButton alloc] init];
|
||||||
[btlishi setImage:[UIImage imageNamed:@"home_lishi"] forState:UIControlStateNormal];
|
[btlishi setImage:[UIImage imageNamed:@"home_lishi"] forState:UIControlStateNormal];
|
||||||
|
@ -110,14 +123,14 @@
|
||||||
else
|
else
|
||||||
{///身份选择
|
{///身份选择
|
||||||
///未选择过身份或者是职场
|
///未选择过身份或者是职场
|
||||||
if([UserInfoModel shareModel].lingyu.intValue == 1)
|
if([UserInfoModel shareModel].identityType.intValue == 3 || [UserInfoModel shareModel].user_stage==nil)
|
||||||
{
|
{
|
||||||
ShouYeShenFenViewController *vc = [ShouYeShenFenViewController new];
|
ShouYeLingYuViewController *vc = [ShouYeLingYuViewController new];
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShouYeLingYuViewController *vc = [ShouYeLingYuViewController new];
|
ShouYeShenFenViewController *vc = [ShouYeShenFenViewController new];
|
||||||
[self.navigationController pushViewController:vc animated:YES];
|
[self.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +139,7 @@
|
||||||
#pragma mark - UITableView
|
#pragma mark - UITableView
|
||||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||||
{
|
{
|
||||||
if([UserInfoModel shareModel].lingyu.intValue==2)return 4;
|
if([UserInfoModel shareModel].identityType.intValue==3)return 4;
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
|
@ -139,10 +152,11 @@
|
||||||
}
|
}
|
||||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
int type = [UserInfoModel shareModel].lingyu.intValue;
|
///0学生 1家长 2老师 3职场
|
||||||
|
int type = [UserInfoModel shareModel].identityType.intValue;
|
||||||
if(indexPath.section==0)
|
if(indexPath.section==0)
|
||||||
{
|
{
|
||||||
if(type==2)
|
if(type==3)
|
||||||
{///职场
|
{///职场
|
||||||
static NSString *strcell = @"ShouYeZCPPTTableViewCell";
|
static NSString *strcell = @"ShouYeZCPPTTableViewCell";
|
||||||
ShouYeZCPPTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
ShouYeZCPPTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||||
|
@ -157,9 +171,8 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
///1学生 2家长 3老师
|
int shenfen = [UserInfoModel shareModel].identityType.intValue;
|
||||||
int shenfen = [UserInfoModel shareModel].shenfen.intValue;
|
if (shenfen==1||shenfen==2)
|
||||||
if (shenfen==3||shenfen==2)
|
|
||||||
{
|
{
|
||||||
static NSString *strcell = @"ShouYeLSZWPGTableViewCell";
|
static NSString *strcell = @"ShouYeLSZWPGTableViewCell";
|
||||||
ShouYeLSZWPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
ShouYeLSZWPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||||
|
@ -189,7 +202,7 @@
|
||||||
}
|
}
|
||||||
else if(indexPath.section==1)
|
else if(indexPath.section==1)
|
||||||
{
|
{
|
||||||
if(type==2)
|
if(type==3)
|
||||||
{///职场
|
{///职场
|
||||||
static NSString *strcell = @"ShouYeZCXZTableViewCell";
|
static NSString *strcell = @"ShouYeZCXZTableViewCell";
|
||||||
ShouYeZCXZTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
ShouYeZCXZTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||||
|
@ -204,9 +217,8 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
///1学生 2家长 3老师
|
int shenfen = [UserInfoModel shareModel].identityType.intValue;
|
||||||
int shenfen = [UserInfoModel shareModel].shenfen.intValue;
|
if (shenfen==1||shenfen==2)
|
||||||
if (shenfen==3||shenfen==2)
|
|
||||||
{
|
{
|
||||||
static NSString *strcell = @"ShouYeLSKTPGTableViewCell";
|
static NSString *strcell = @"ShouYeLSKTPGTableViewCell";
|
||||||
ShouYeLSKTPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
ShouYeLSKTPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||||
|
@ -257,6 +269,7 @@
|
||||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||||
[cell setBackgroundColor:[UIColor clearColor]];
|
[cell setBackgroundColor:[UIColor clearColor]];
|
||||||
}
|
}
|
||||||
|
cell.arrdata = self.arrTools;
|
||||||
|
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
@ -303,8 +316,8 @@
|
||||||
}
|
}
|
||||||
else if(indexPath.section==1)
|
else if(indexPath.section==1)
|
||||||
{
|
{
|
||||||
int type = [UserInfoModel shareModel].lingyu.intValue;
|
int type = [UserInfoModel shareModel].identityType.intValue;
|
||||||
if(type==2)
|
if(type==3)
|
||||||
{
|
{
|
||||||
return 140;
|
return 140;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +331,12 @@
|
||||||
{
|
{
|
||||||
/// 没得工具52 有 +86一行 第一行是76;
|
/// 没得工具52 有 +86一行 第一行是76;
|
||||||
float fheight = 52;
|
float fheight = 52;
|
||||||
fheight+=86-10;
|
NSInteger iline = self.arrTools.count/4;
|
||||||
|
if(self.arrTools.count%4!=0)iline+=1;
|
||||||
|
if(iline>0)
|
||||||
|
{
|
||||||
|
fheight+=86*iline-10;
|
||||||
|
}
|
||||||
return fheight;
|
return fheight;
|
||||||
}
|
}
|
||||||
return 75;
|
return 75;
|
||||||
|
@ -392,6 +410,58 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
///用户信息
|
||||||
|
-(void)getUserData
|
||||||
|
{
|
||||||
|
[PublicNetWorkManager requestUserData:self.view Callback:^(BOOL state, UserModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
[UserInfoModel shareModel].isAllLevel = responseObject.data.isAllLevel;
|
||||||
|
[UserInfoModel shareModel].identityType = responseObject.data.identityType;
|
||||||
|
[UserInfoModel shareModel].user_stage = responseObject.data.user_stage;
|
||||||
|
|
||||||
|
[self updateBtShow];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
///常用工具
|
||||||
|
-(void)getTools
|
||||||
|
{
|
||||||
|
[NetWorkManager requestToolsFavData:self.view page:1 size:@"100" Callback:^(BOOL state, ToolsListModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.arrTools = responseObject.data.items;
|
||||||
|
[self.tableView reloadData];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)updateBtShow
|
||||||
|
{
|
||||||
|
if([UserInfoModel shareModel].identityType.intValue==3)
|
||||||
|
{
|
||||||
|
[self.btnianji setTitle:[NSString stringWithFormat:@"%@",[UserInfoModel getidentityTypeString]] forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if([UserInfoModel shareModel].user_stage==nil)
|
||||||
|
{
|
||||||
|
[self.btnianji setTitle:@"请选择" forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if([UserInfoModel shareModel].isAllLevel.intValue==1)
|
||||||
|
{
|
||||||
|
[self.btnianji setTitle:[NSString stringWithFormat:@"%@-%@",[UserInfoModel getidentityTypeString],[UserInfoModel shareModel].user_stage.parent_name] forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self.btnianji setTitle:[NSString stringWithFormat:@"%@-%@",[UserInfoModel getidentityTypeString],[UserInfoModel shareModel].user_stage.name] forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self.btnianji setIconInRightWithSpacing:6];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "ShouYeBannerTableViewCell.h"
|
#import "ShouYeBannerTableViewCell.h"
|
||||||
|
#import "StartPayViewController.h"
|
||||||
|
#import "KeTangXieZuoViewController.h"
|
||||||
|
|
||||||
@interface ShouYeBannerTableViewCell ()<SDCycleScrollViewDelegate>
|
@interface ShouYeBannerTableViewCell ()<SDCycleScrollViewDelegate>
|
||||||
//轮播
|
//轮播
|
||||||
|
@ -19,6 +20,12 @@
|
||||||
{
|
{
|
||||||
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
|
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
|
||||||
{
|
{
|
||||||
|
UIView *viewback = [[UIView alloc] init];
|
||||||
|
[self.contentView addSubview:viewback];
|
||||||
|
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self);
|
||||||
|
}];
|
||||||
|
|
||||||
SDCycleScrollView *cleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero imageNamesGroup:@[]];
|
SDCycleScrollView *cleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero imageNamesGroup:@[]];
|
||||||
cleScrollView.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
cleScrollView.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||||
cleScrollView.delegate = self;
|
cleScrollView.delegate = self;
|
||||||
|
@ -27,28 +34,72 @@
|
||||||
cleScrollView.titleLabelTextColor = [UIColor darkGrayColor];
|
cleScrollView.titleLabelTextColor = [UIColor darkGrayColor];
|
||||||
cleScrollView.titleLabelTextFont = [UIFont systemFontOfSize:[Tools sizeFont:14]];
|
cleScrollView.titleLabelTextFont = [UIFont systemFontOfSize:[Tools sizeFont:14]];
|
||||||
cleScrollView.autoScrollTimeInterval = 3.0;
|
cleScrollView.autoScrollTimeInterval = 3.0;
|
||||||
cleScrollView.placeholderImage = [UIImage imageNamed:@"home_bannernomo"];
|
// cleScrollView.placeholderImage = [UIImage imageNamed:@"home_bannernomo"];
|
||||||
cleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
cleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||||
[cleScrollView setShowPageControl:YES];
|
[cleScrollView setShowPageControl:YES];
|
||||||
cleScrollView.pageControlBottomOffset = -5;
|
cleScrollView.pageControlBottomOffset = -5;
|
||||||
cleScrollView.pageControlDotSize = CGSizeMake(4, 4);
|
cleScrollView.pageControlDotSize = CGSizeMake(4, 4);
|
||||||
[self addSubview:cleScrollView];
|
[viewback addSubview:cleScrollView];
|
||||||
[cleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[cleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.edges.equalTo(self);
|
make.edges.equalTo(viewback);
|
||||||
}];
|
}];
|
||||||
[cleScrollView.layer setMasksToBounds:YES];
|
[cleScrollView.layer setMasksToBounds:YES];
|
||||||
[cleScrollView.layer setCornerRadius:8];
|
[cleScrollView.layer setCornerRadius:8];
|
||||||
|
[cleScrollView setUserInteractionEnabled:YES];
|
||||||
_cleScrollView = cleScrollView;
|
_cleScrollView = cleScrollView;
|
||||||
|
|
||||||
cleScrollView.imageURLStringsGroup = @[@"",@"",@""];
|
NSArray *arrbanner = [[UserInfoModel shareModel].config objectForKey:@"client.home.banner.urls"];
|
||||||
|
NSMutableArray *arrurls = [NSMutableArray new];
|
||||||
|
for(NSDictionary *dic in arrbanner)
|
||||||
|
{
|
||||||
|
[arrurls addObject:[Tools isStringnil:[dic objectForKey:@"image"]]];
|
||||||
|
}
|
||||||
|
cleScrollView.imageURLStringsGroup = arrurls;
|
||||||
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
}
|
||||||
|
#pragma mark - SDCycleScrollView
|
||||||
|
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/** 点击图片回调 */
|
/** 点击图片回调 */
|
||||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
|
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[self pushAction:index];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)pushAction:(NSInteger)index
|
||||||
|
{
|
||||||
|
NSArray *arrbanner = [[UserInfoModel shareModel].config objectForKey:@"client.home.banner.urls"];
|
||||||
|
|
||||||
|
NSDictionary *dic = arrbanner[index];
|
||||||
|
NSString *strpage = [Tools isStringnil:[dic objectForKey:@"page"]];
|
||||||
|
if([strpage isEqualToString:@"recharge"])
|
||||||
|
{
|
||||||
|
StartPayViewController *vc = [StartPayViewController new];
|
||||||
|
vc.ptype = 1;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if([strpage isEqualToString:@"composition"])
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"carnumberChangeNotifi" object:@"1"];
|
||||||
|
}
|
||||||
|
else if([strpage isEqualToString:@"write_tools"])
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"carnumberChangeNotifi" object:@"3"];
|
||||||
|
}
|
||||||
|
else if([strpage isEqualToString:@"classroom_write"])
|
||||||
|
{
|
||||||
|
KeTangXieZuoViewController *vc = [KeTangXieZuoViewController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if([strpage isEqualToString:@"write_assistant"])
|
||||||
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"carnumberChangeNotifi" object:@"2"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface ShouYeToolsTableViewCell : UITableViewCell
|
@interface ShouYeToolsTableViewCell : UITableViewCell
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -7,11 +7,23 @@
|
||||||
|
|
||||||
#import "ShouYeToolsTableViewCell.h"
|
#import "ShouYeToolsTableViewCell.h"
|
||||||
#import "ShouYeToolsCollectionViewCell.h"
|
#import "ShouYeToolsCollectionViewCell.h"
|
||||||
|
#import "ToolsListModel.h"
|
||||||
|
|
||||||
|
#import "GongJuCreateViewController.h"
|
||||||
|
#import "KeTangXieZuoViewController.h"
|
||||||
|
#import "GongJuTextViewController.h"
|
||||||
|
#import "GongJuWenBenViewController.h"
|
||||||
|
#import "GongJuFanYiViewController.h"
|
||||||
|
#import "GongJuImageToTextViewController.h"
|
||||||
|
#import "GongJuMinGanCiController.h"
|
||||||
|
|
||||||
|
|
||||||
@interface ShouYeToolsTableViewCell ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
@interface ShouYeToolsTableViewCell ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UICollectionView *collect;
|
@property (nonatomic , strong) UICollectionView *collect;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) UIButton *btmore ;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -55,6 +67,7 @@
|
||||||
}];
|
}];
|
||||||
[btmore setIconInRightWithSpacing:2];
|
[btmore setIconInRightWithSpacing:2];
|
||||||
[btmore addTarget:self action:@selector(moreAction) forControlEvents:UIControlEventTouchUpInside];
|
[btmore addTarget:self action:@selector(moreAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
_btmore = btmore;
|
||||||
|
|
||||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
layout.minimumLineSpacing = 0;
|
layout.minimumLineSpacing = 0;
|
||||||
|
@ -69,7 +82,7 @@
|
||||||
make.left.offset(0);
|
make.left.offset(0);
|
||||||
make.right.equalTo(viewback);
|
make.right.equalTo(viewback);
|
||||||
make.top.equalTo(lbname.mas_bottom).offset(2);
|
make.top.equalTo(lbname.mas_bottom).offset(2);
|
||||||
make.height.offset(86);
|
make.bottom.equalTo(viewback);
|
||||||
}];
|
}];
|
||||||
[collect registerClass:[ShouYeToolsCollectionViewCell class] forCellWithReuseIdentifier:@"ShouYeToolsCollectionViewCell"];
|
[collect registerClass:[ShouYeToolsCollectionViewCell class] forCellWithReuseIdentifier:@"ShouYeToolsCollectionViewCell"];
|
||||||
_collect = collect;
|
_collect = collect;
|
||||||
|
@ -79,17 +92,42 @@
|
||||||
}
|
}
|
||||||
-(void)moreAction
|
-(void)moreAction
|
||||||
{
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"carnumberChangeNotifi" object:@"3"];
|
||||||
|
}
|
||||||
|
-(void)setArrdata:(NSArray *)arrdata
|
||||||
|
{
|
||||||
|
_arrdata = arrdata;
|
||||||
|
|
||||||
|
if(arrdata.count==0)
|
||||||
|
{
|
||||||
|
[self.btmore setTitle:@"前往收藏" forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self.btmore setTitle:@"查看更多" forState:UIControlStateNormal];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self.collect reloadData];
|
||||||
}
|
}
|
||||||
#pragma mark - UICollectionView
|
#pragma mark - UICollectionView
|
||||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
return 4;
|
return self.arrdata.count;
|
||||||
}
|
}
|
||||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
ShouYeToolsCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ShouYeToolsCollectionViewCell" forIndexPath:indexPath];
|
ShouYeToolsCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ShouYeToolsCollectionViewCell" forIndexPath:indexPath];
|
||||||
|
ToolsListModelDataItems *model = self.arrdata[indexPath.row];
|
||||||
|
cell.lbname.text = [Tools isStringnilkong:model.tool_name];
|
||||||
|
|
||||||
|
if([model.tool_icon containsString:@"http"])
|
||||||
|
{
|
||||||
|
[cell.imgvback sd_setImageWithURL:[NSURL URLWithString:model.tool_icon] placeholderImage:nil];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cell.imgvback.image = [UIImage imageNamed:[NSString stringWithFormat:@"gj_%@",model.ID]];
|
||||||
|
}
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
//定义每个section的间距
|
//定义每个section的间距
|
||||||
|
@ -112,7 +150,46 @@
|
||||||
}
|
}
|
||||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
///做选中操作
|
ToolsListModelDataItems *model = self.arrdata[indexPath.row];
|
||||||
|
if(model.ID.intValue>=1 && model.ID.intValue<=9)
|
||||||
|
{
|
||||||
|
if(model.ID.intValue==9)
|
||||||
|
{
|
||||||
|
KeTangXieZuoViewController *vc = [KeTangXieZuoViewController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(model.ID.intValue==6||model.ID.intValue==7||model.ID.intValue==8||model.ID.intValue==3)
|
||||||
|
{
|
||||||
|
GongJuTextViewController *vc = [GongJuTextViewController new];
|
||||||
|
vc.strtitle = model.tool_name;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(model.ID.intValue==5)
|
||||||
|
{
|
||||||
|
GongJuMinGanCiController *vc = [GongJuMinGanCiController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(model.ID.intValue==4)
|
||||||
|
{
|
||||||
|
GongJuFanYiViewController *vc = [GongJuFanYiViewController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(model.ID.intValue==2)
|
||||||
|
{
|
||||||
|
GongJuWenBenViewController *vc = [GongJuWenBenViewController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
else if(model.ID.intValue==1)
|
||||||
|
{
|
||||||
|
GongJuImageToTextViewController *vc = [GongJuImageToTextViewController new];
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GongJuCreateViewController *vc = [GongJuCreateViewController new];
|
||||||
|
vc.modelDetail = model;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -7,11 +7,16 @@
|
||||||
|
|
||||||
#import "ShouYeLingYuViewController.h"
|
#import "ShouYeLingYuViewController.h"
|
||||||
#import "ShouYeShenFenViewController.h"
|
#import "ShouYeShenFenViewController.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface ShouYeLingYuViewController ()
|
@interface ShouYeLingYuViewController ()
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSMutableArray *arrLB;
|
@property (nonatomic , strong) NSMutableArray *arrLB;
|
||||||
|
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ShouYeLingYuViewController
|
@implementation ShouYeLingYuViewController
|
||||||
|
@ -75,6 +80,7 @@
|
||||||
UILabel *lbitem = [self drawItemView:viewitem title:arrtt[i] tag:i];
|
UILabel *lbitem = [self drawItemView:viewitem title:arrtt[i] tag:i];
|
||||||
[self.arrLB addObject:lbitem];
|
[self.arrLB addObject:lbitem];
|
||||||
}
|
}
|
||||||
|
[self getNianJiData];
|
||||||
}
|
}
|
||||||
-(UILabel *)drawItemView:(UIView *)view title:(NSString *)title tag:(int)tag
|
-(UILabel *)drawItemView:(UIView *)view title:(NSString *)title tag:(int)tag
|
||||||
{
|
{
|
||||||
|
@ -136,7 +142,6 @@
|
||||||
[self.view setUserInteractionEnabled:YES];
|
[self.view setUserInteractionEnabled:YES];
|
||||||
if(sender.tag==0)
|
if(sender.tag==0)
|
||||||
{
|
{
|
||||||
[UserInfoModel shareModel].lingyu = @"1";
|
|
||||||
NSArray *arrvc = self.navigationController.viewControllers;
|
NSArray *arrvc = self.navigationController.viewControllers;
|
||||||
for(UIViewController *vc in arrvc)
|
for(UIViewController *vc in arrvc)
|
||||||
{
|
{
|
||||||
|
@ -151,11 +156,57 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[UserInfoModel shareModel].lingyu = @"2";
|
[self updataUserInfo];
|
||||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
-(void)getNianJiData
|
||||||
|
{
|
||||||
|
[LoadAlterView show];
|
||||||
|
[NetWorkManager requestRoleTreeData:self.view Callback:^(BOOL state, RoleTreeModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
self.arrdata = responseObject.data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)updataUserInfo
|
||||||
|
{
|
||||||
|
for(RoleTreeModelData *model in self.arrdata)
|
||||||
|
{
|
||||||
|
if([model.name isEqualToString:@"职场"])
|
||||||
|
{///更新用户信息
|
||||||
|
RoleTreeModelData *modelson = model.node.firstObject;
|
||||||
|
NSDictionary *dicuser_stage = [modelson yy_modelToJSONObject];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:dicuser_stage forKey:@"user_stage"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithBool:NO] forKey:@"isAllLevel"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithInt:3] forKey:@"identityType"];
|
||||||
|
|
||||||
|
[PublicNetWorkManager requestUserPutData:self.view body:dicpush Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
[UserInfoModel shareModel].user_stage = modelson;
|
||||||
|
[UserInfoModel shareModel].isAllLevel = [NSString stringWithFormat:@"%@",[NSNumber numberWithBool:NO]];
|
||||||
|
[UserInfoModel shareModel].identityType = @"3";
|
||||||
|
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
#import "ShouYeShenFenViewController.h"
|
#import "ShouYeShenFenViewController.h"
|
||||||
#import "ShouYeShenFenView.h"
|
#import "ShouYeShenFenView.h"
|
||||||
|
#import "NetWorkManager.h"
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
|
||||||
@interface ShouYeShenFenViewController ()
|
@interface ShouYeShenFenViewController ()
|
||||||
///
|
///
|
||||||
|
@ -48,7 +49,23 @@
|
||||||
make.left.right.bottom.equalTo(self.view);
|
make.left.right.bottom.equalTo(self.view);
|
||||||
make.top.offset(NavHeight);
|
make.top.offset(NavHeight);
|
||||||
}];
|
}];
|
||||||
|
[view setHidden:YES];
|
||||||
_viewshow = view;
|
_viewshow = view;
|
||||||
|
|
||||||
|
[LoadAlterView show];
|
||||||
|
[NetWorkManager requestRoleTreeData:self.view Callback:^(BOOL state, RoleTreeModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
[LoadAlterView dismiss];
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
view.arrdata = responseObject.data;
|
||||||
|
[self.viewshow setHidden:NO];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)drawTop
|
-(void)drawTop
|
||||||
|
@ -71,7 +88,5 @@
|
||||||
-(void)okAction
|
-(void)okAction
|
||||||
{
|
{
|
||||||
[self.viewshow okAction];
|
[self.viewshow okAction];
|
||||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -13,7 +13,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
///0学生 1家长 2老师
|
///0学生 1家长 2老师
|
||||||
@property (nonatomic , assign) NSInteger type;
|
@property (nonatomic , assign) NSInteger type;
|
||||||
|
|
||||||
-(NSString *)getSelectNJ;
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
|
|
||||||
|
-(NSArray *)getSelectNJ;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,11 @@
|
||||||
#import "ShouYeShenFenNianJiView.h"
|
#import "ShouYeShenFenNianJiView.h"
|
||||||
#import "TextCollectionViewCell.h"
|
#import "TextCollectionViewCell.h"
|
||||||
#import "TextHeaderCollectionViewCell.h"
|
#import "TextHeaderCollectionViewCell.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
|
||||||
@interface ShouYeShenFenNianJiView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
@interface ShouYeShenFenNianJiView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UICollectionView *collect;
|
@property (nonatomic , strong) UICollectionView *collect;
|
||||||
///
|
|
||||||
@property (nonatomic , strong) NSMutableArray *arrData;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) NSArray *arrGetData;
|
@property (nonatomic , strong) NSArray *arrGetData;
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
[collect registerClass:[TextHeaderCollectionViewCell class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"TextHeaderCollectionViewCell"];
|
[collect registerClass:[TextHeaderCollectionViewCell class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"TextHeaderCollectionViewCell"];
|
||||||
|
|
||||||
_collect = collect;
|
_collect = collect;
|
||||||
[self setdata];
|
|
||||||
|
|
||||||
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.height.offset(403);
|
make.height.offset(403);
|
||||||
|
@ -62,95 +60,100 @@
|
||||||
[self setSelectNoModel];
|
[self setSelectNoModel];
|
||||||
[self.collect reloadData];
|
[self.collect reloadData];
|
||||||
}
|
}
|
||||||
-(void)setdata
|
-(void)setArrdata:(NSArray *)arrdata
|
||||||
{
|
{
|
||||||
NSArray *arr = @[@[@"一年级",@"二年级",@"三年级",@"四年级",@"五年级",@"六年级"],@[@"七年级",@"八年级",@"九年级"],@[@"高一",@"高二",@"高三"]];
|
_arrdata = arrdata;
|
||||||
self.arrData = [NSMutableArray new];
|
|
||||||
for(NSArray *arrtemp in arr)
|
if([UserInfoModel shareModel].user_stage)
|
||||||
{
|
{
|
||||||
NSMutableArray *arritem = [NSMutableArray new];
|
if([UserInfoModel shareModel].isAllLevel.intValue == 1)
|
||||||
for(NSString *str in arrtemp)
|
{///全选一个学段
|
||||||
{
|
for(RoleTreeModelData *modelsuper in self.arrdata)
|
||||||
baseInfoModel *model = [baseInfoModel new];
|
{
|
||||||
model.title = str;
|
if(modelsuper.ID.intValue == [UserInfoModel shareModel].user_stage.pid.intValue)
|
||||||
[arritem addObject:model];
|
{
|
||||||
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
|
{
|
||||||
|
model.select = YES;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{///选择一个年级
|
||||||
|
for(RoleTreeModelData *modelsuper in self.arrdata)
|
||||||
|
{
|
||||||
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
|
{
|
||||||
|
if(model.ID.intValue == [UserInfoModel shareModel].user_stage.ID.intValue)
|
||||||
|
{
|
||||||
|
model.select = YES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
[self.arrData addObject:arritem];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.collect reloadData];
|
[self.collect reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)btHeaderAction:(UIButton *)sender
|
-(void)btHeaderAction:(UIButton *)sender
|
||||||
{
|
{
|
||||||
sender.selected = YES;
|
sender.selected = YES;
|
||||||
for(NSArray *arr in self.arrData)
|
for(RoleTreeModelData *modelsuper in self.arrdata)
|
||||||
{
|
{
|
||||||
for(baseInfoModel *model in arr)
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
{
|
{
|
||||||
model.select = NO;
|
model.select = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSArray *arr = self.arrData[sender.tag];
|
RoleTreeModelData *modelsuper = self.arrdata[sender.tag];
|
||||||
for(baseInfoModel *model in arr)
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
{
|
{
|
||||||
model.select = sender.selected;
|
model.select = sender.selected;
|
||||||
}
|
}
|
||||||
[self.collect reloadData];
|
[self.collect reloadData];
|
||||||
}
|
}
|
||||||
-(NSString *)getSelectNJ
|
-(NSArray *)getSelectNJ
|
||||||
{
|
{
|
||||||
NSMutableArray *arrselect = [NSMutableArray new];
|
NSMutableArray *arrselect = [NSMutableArray new];
|
||||||
for(NSArray *arr in self.arrData)
|
for(RoleTreeModelData *modelsuper in self.arrdata)
|
||||||
{
|
{
|
||||||
for(baseInfoModel *model in arr)
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
{
|
{
|
||||||
if(model.select)
|
if(model.select)
|
||||||
{
|
{
|
||||||
[arrselect addObject:model.title];
|
[arrselect addObject:model];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arrselect.count==0)
|
if(arrselect.count==0)
|
||||||
{
|
{
|
||||||
[HXHud showMessage:@"请选择年级" afterDelayType:0];
|
[HXHud showMessage:@"请选择年级" afterDelayType:0];
|
||||||
return @"";
|
return @[];
|
||||||
}
|
|
||||||
if(arrselect.count==1)
|
|
||||||
{
|
|
||||||
return arrselect.firstObject;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(self.btselect.tag==0)
|
|
||||||
{
|
|
||||||
return @"小学";
|
|
||||||
}
|
|
||||||
else if(self.btselect.tag==1)
|
|
||||||
{
|
|
||||||
return @"初中";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return @"高中";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return arrselect;
|
||||||
}
|
}
|
||||||
#pragma mark - UICollectionView
|
#pragma mark - UICollectionView
|
||||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
|
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
|
||||||
{
|
{
|
||||||
return self.arrData.count;
|
return self.arrdata.count>3?3:self.arrdata.count;
|
||||||
}
|
}
|
||||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
NSArray *arr = self.arrData[section];
|
RoleTreeModelData *model = self.arrdata[section];
|
||||||
return arr.count;
|
|
||||||
|
return model.node.count;
|
||||||
}
|
}
|
||||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
TextCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TextCollectionViewCell" forIndexPath:indexPath];
|
TextCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TextCollectionViewCell" forIndexPath:indexPath];
|
||||||
NSArray *arr = self.arrData[indexPath.section];
|
RoleTreeModelData *model = self.arrdata[indexPath.section];
|
||||||
cell.model = arr[indexPath.row];
|
cell.model = model.node[indexPath.row];
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
//定义每个section的间距
|
//定义每个section的间距
|
||||||
|
@ -180,27 +183,17 @@
|
||||||
|
|
||||||
if (kind == UICollectionElementKindSectionHeader) {
|
if (kind == UICollectionElementKindSectionHeader) {
|
||||||
TextHeaderCollectionViewCell *header = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"TextHeaderCollectionViewCell" forIndexPath:indexPath];
|
TextHeaderCollectionViewCell *header = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"TextHeaderCollectionViewCell" forIndexPath:indexPath];
|
||||||
if(indexPath.section==0)
|
RoleTreeModelData *modelsuper = self.arrdata[indexPath.section];
|
||||||
{
|
header.strtitle = modelsuper.name;
|
||||||
header.strtitle = @"小学";
|
|
||||||
}
|
|
||||||
else if(indexPath.section==1)
|
|
||||||
{
|
|
||||||
header.strtitle = @"初中";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header.strtitle = @"高中";
|
|
||||||
}
|
|
||||||
if(self.type==2)
|
if(self.type==2)
|
||||||
{
|
{
|
||||||
[header.btselect setHidden:NO];
|
[header.btselect setHidden:NO];
|
||||||
[header.btselect setTag:indexPath.section];
|
[header.btselect setTag:indexPath.section];
|
||||||
[header.btselect addTarget:self action:@selector(btHeaderAction:) forControlEvents:UIControlEventTouchUpInside];
|
[header.btselect addTarget:self action:@selector(btHeaderAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
NSArray *arr = self.arrData[indexPath.section];
|
|
||||||
BOOL isselectAll = YES;
|
BOOL isselectAll = YES;
|
||||||
for(baseInfoModel *model in arr)
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
{
|
{
|
||||||
if(model.select == NO)
|
if(model.select == NO)
|
||||||
{
|
{
|
||||||
|
@ -228,8 +221,9 @@
|
||||||
}
|
}
|
||||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
NSArray *arr = self.arrData[indexPath.section];
|
RoleTreeModelData *modelsuper = self.arrdata[indexPath.section];
|
||||||
baseInfoModel *model = arr[indexPath.row];
|
|
||||||
|
RoleTreeModelData *model = modelsuper.node[indexPath.row];
|
||||||
[self setSelectNoModel];
|
[self setSelectNoModel];
|
||||||
model.select = YES;
|
model.select = YES;
|
||||||
[self.collect reloadData];
|
[self.collect reloadData];
|
||||||
|
@ -237,9 +231,9 @@
|
||||||
|
|
||||||
-(void)setSelectNoModel
|
-(void)setSelectNoModel
|
||||||
{
|
{
|
||||||
for(NSArray *arr in self.arrData)
|
for(RoleTreeModelData *modelsuper in self.arrdata)
|
||||||
{
|
{
|
||||||
for(baseInfoModel *model in arr)
|
for(RoleTreeModelData *model in modelsuper.node)
|
||||||
{
|
{
|
||||||
model.select = NO;
|
model.select = NO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface ShouYeShenFenView : UIView
|
@interface ShouYeShenFenView : UIView
|
||||||
|
///
|
||||||
|
@property (nonatomic , strong) NSArray *arrdata;
|
||||||
-(void)okAction;
|
-(void)okAction;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
#import "ShouYeShenFenNianJiView.h"
|
#import "ShouYeShenFenNianJiView.h"
|
||||||
#import "ShouYeLingYuViewController.h"
|
#import "ShouYeLingYuViewController.h"
|
||||||
|
|
||||||
|
#import "PublicNetWorkManager.h"
|
||||||
|
#import "RoleTreeModel.h"
|
||||||
|
|
||||||
@interface ShouYeShenFenView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
@interface ShouYeShenFenView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||||
///
|
///
|
||||||
@property (nonatomic , strong) UICollectionView *collect;
|
@property (nonatomic , strong) UICollectionView *collect;
|
||||||
|
@ -136,6 +139,12 @@
|
||||||
}];
|
}];
|
||||||
[btqh addTarget:self action:@selector(qiehuanAction) forControlEvents:UIControlEventTouchUpInside];
|
[btqh addTarget:self action:@selector(qiehuanAction) forControlEvents:UIControlEventTouchUpInside];
|
||||||
}
|
}
|
||||||
|
-(void)setArrdata:(NSArray *)arrdata
|
||||||
|
{
|
||||||
|
_arrdata = arrdata;
|
||||||
|
|
||||||
|
self.viewnj.arrdata = self.arrdata;
|
||||||
|
}
|
||||||
///切换领域
|
///切换领域
|
||||||
-(void)qiehuanAction
|
-(void)qiehuanAction
|
||||||
{
|
{
|
||||||
|
@ -150,10 +159,14 @@
|
||||||
{
|
{
|
||||||
baseInfoModel *model = [baseInfoModel new];
|
baseInfoModel *model = [baseInfoModel new];
|
||||||
model.name = arr[i];
|
model.name = arr[i];
|
||||||
model.Id = [NSString stringWithFormat:@"%d",i+1];
|
model.Id = [NSString stringWithFormat:@"%d",i];
|
||||||
|
if([UserInfoModel shareModel].identityType.intValue==i)
|
||||||
|
{
|
||||||
|
model.select = YES;
|
||||||
|
self.viewnj.type = i;
|
||||||
|
}
|
||||||
[self.arrjx addObject:model];
|
[self.arrjx addObject:model];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)okAction
|
-(void)okAction
|
||||||
|
@ -171,16 +184,40 @@
|
||||||
[HXHud showMessage:@"请选择身份" afterDelayType:0];
|
[HXHud showMessage:@"请选择身份" afterDelayType:0];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSString *strnj = [self.viewnj getSelectNJ];
|
NSArray *arrnj = [self.viewnj getSelectNJ];
|
||||||
if(strnj.length==0)
|
|
||||||
|
if(arrnj.count==0)
|
||||||
{
|
{
|
||||||
[HXHud showMessage:@"请选择年级" afterDelayType:0];
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
[UserInfoModel shareModel].shenfen = modelselect.Id;
|
|
||||||
|
|
||||||
|
///更新用户信息
|
||||||
|
[self updataUserInfo:arrnj[arrnj.count/2] type:modelselect.Id.intValue isall:arrnj.count>1?YES:NO];
|
||||||
|
}
|
||||||
|
-(void)updataUserInfo:(RoleTreeModelData *)modelson type:(int)type isall:(BOOL)isall
|
||||||
|
{
|
||||||
|
NSDictionary *dicuser_stage = [modelson yy_modelToJSONObject];
|
||||||
|
|
||||||
|
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||||
|
[dicpush setObject:dicuser_stage forKey:@"user_stage"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithBool:isall] forKey:@"isAllLevel"];
|
||||||
|
[dicpush setObject:[NSNumber numberWithInt:type] forKey:@"identityType"];
|
||||||
|
|
||||||
|
[PublicNetWorkManager requestUserPutData:self body:dicpush Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
modelson.select = NO;
|
||||||
|
[UserInfoModel shareModel].user_stage = modelson;
|
||||||
|
[UserInfoModel shareModel].isAllLevel = [NSString stringWithFormat:@"%@",[NSNumber numberWithBool:isall]];
|
||||||
|
[UserInfoModel shareModel].identityType = [NSString stringWithFormat:@"%d",type];
|
||||||
|
[self.viewController.navigationController popToRootViewControllerAnimated:YES];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||||
|
}
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - UICollectionView
|
#pragma mark - UICollectionView
|
||||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue