我的模块的我的设置内容
This commit is contained in:
2
Podfile
2
Podfile
@@ -17,6 +17,8 @@ target 'xplan-ios' do
|
||||
pod 'MJExtension'
|
||||
#图片加载
|
||||
pod 'SDWebImage'
|
||||
#输入
|
||||
pod 'SZTextView'
|
||||
#登录的
|
||||
pod 'mob_sharesdk'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/QQ'
|
||||
|
@@ -37,6 +37,7 @@ PODS:
|
||||
- SDWebImage (5.11.1):
|
||||
- SDWebImage/Core (= 5.11.1)
|
||||
- SDWebImage/Core (5.11.1)
|
||||
- SZTextView (1.3.0)
|
||||
- YYText (1.0.7)
|
||||
|
||||
DEPENDENCIES:
|
||||
@@ -51,6 +52,7 @@ DEPENDENCIES:
|
||||
- NTESQuickPass (~> 2.1.6)
|
||||
- ReactiveObjC
|
||||
- SDWebImage
|
||||
- SZTextView
|
||||
- YYText
|
||||
|
||||
SPEC REPOS:
|
||||
@@ -64,6 +66,7 @@ SPEC REPOS:
|
||||
- NTESQuickPass
|
||||
- ReactiveObjC
|
||||
- SDWebImage
|
||||
- SZTextView
|
||||
- YYText
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
@@ -76,8 +79,9 @@ SPEC CHECKSUMS:
|
||||
NTESQuickPass: 8431dc52737c95883cd382c2ee75664d58f39377
|
||||
ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
|
||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||
SZTextView: 094dc6acc9beec537685c545d6e3e0d4975174e1
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
|
||||
PODFILE CHECKSUM: 687d511184d9d6e28c8efe12fb40a25936953ff4
|
||||
PODFILE CHECKSUM: 2113c2073e538f8e2ce75dd6607e53e5fabd0086
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
|
@@ -87,6 +87,21 @@
|
||||
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872309226E8D31500B90D4F /* LoginVerifCodeView.m */; };
|
||||
E8AC720D26F435F5007D6E91 /* UIImageView+LoadImage.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC720C26F435F5007D6E91 /* UIImageView+LoadImage.m */; };
|
||||
E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC720F26F43955007D6E91 /* UIImageConstant.m */; };
|
||||
E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */; };
|
||||
E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */; };
|
||||
E8AC721926F46E0B007D6E91 /* XPMineSettingItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721826F46E0B007D6E91 /* XPMineSettingItemModel.m */; };
|
||||
E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721B26F4720B007D6E91 /* XPMineSettingPresent.m */; };
|
||||
E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721D26F4723D007D6E91 /* XPMineSettingProtocol.h */; };
|
||||
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722026F47E23007D6E91 /* XPMineAboutUsViewController.m */; };
|
||||
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722326F47E5E007D6E91 /* XPMineFeedbackViewController.m */; };
|
||||
E8AC722726F482A4007D6E91 /* XPMineFeedbackPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722626F482A4007D6E91 /* XPMineFeedbackPresenter.m */; };
|
||||
E8AC722926F488DA007D6E91 /* XPMineFeedbackProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722826F48889007D6E91 /* XPMineFeedbackProtocol.h */; };
|
||||
E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722B26F49580007D6E91 /* XPMineNotificaViewController.m */; };
|
||||
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC722E26F49610007D6E91 /* XPMineNotificationItemModel.m */; };
|
||||
E8AC723226F49710007D6E91 /* XPMineNotificationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC723126F49710007D6E91 /* XPMineNotificationTableViewCell.m */; };
|
||||
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC723426F49939007D6E91 /* XPMineNotificaPresenter.m */; };
|
||||
E8AC723726F49982007D6E91 /* XPMineNotificaProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8AC723626F49957007D6E91 /* XPMineNotificaProtocol.h */; };
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC723926F49AAE007D6E91 /* XPMineNotifyStatus.m */; };
|
||||
E8B825B726E9A7D8009E8E9F /* BaseObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B825B626E9A7D8009E8E9F /* BaseObject.m */; };
|
||||
E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B825BE26E9E57D009E8E9F /* LoginTicketInfo.m */; };
|
||||
E8B825C226EA00DF009E8E9F /* LoginVerifCodePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B825C126EA00DF009E8E9F /* LoginVerifCodePresent.m */; };
|
||||
@@ -265,6 +280,33 @@
|
||||
E8AC720C26F435F5007D6E91 /* UIImageView+LoadImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+LoadImage.m"; sourceTree = "<group>"; };
|
||||
E8AC720E26F43955007D6E91 /* UIImageConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIImageConstant.h; sourceTree = "<group>"; };
|
||||
E8AC720F26F43955007D6E91 /* UIImageConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageConstant.m; sourceTree = "<group>"; };
|
||||
E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingViewController.h; sourceTree = "<group>"; };
|
||||
E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSettingViewController.m; sourceTree = "<group>"; };
|
||||
E8AC721426F46B06007D6E91 /* XPMineSettingTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSettingTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8AC721726F46E0B007D6E91 /* XPMineSettingItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingItemModel.h; sourceTree = "<group>"; };
|
||||
E8AC721826F46E0B007D6E91 /* XPMineSettingItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSettingItemModel.m; sourceTree = "<group>"; };
|
||||
E8AC721A26F4720B007D6E91 /* XPMineSettingPresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingPresent.h; sourceTree = "<group>"; };
|
||||
E8AC721B26F4720B007D6E91 /* XPMineSettingPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineSettingPresent.m; sourceTree = "<group>"; };
|
||||
E8AC721D26F4723D007D6E91 /* XPMineSettingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingProtocol.h; sourceTree = "<group>"; };
|
||||
E8AC721F26F47E23007D6E91 /* XPMineAboutUsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineAboutUsViewController.h; sourceTree = "<group>"; };
|
||||
E8AC722026F47E23007D6E91 /* XPMineAboutUsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineAboutUsViewController.m; sourceTree = "<group>"; };
|
||||
E8AC722226F47E5E007D6E91 /* XPMineFeedbackViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFeedbackViewController.h; sourceTree = "<group>"; };
|
||||
E8AC722326F47E5E007D6E91 /* XPMineFeedbackViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFeedbackViewController.m; sourceTree = "<group>"; };
|
||||
E8AC722526F482A4007D6E91 /* XPMineFeedbackPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFeedbackPresenter.h; sourceTree = "<group>"; };
|
||||
E8AC722626F482A4007D6E91 /* XPMineFeedbackPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineFeedbackPresenter.m; sourceTree = "<group>"; };
|
||||
E8AC722826F48889007D6E91 /* XPMineFeedbackProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineFeedbackProtocol.h; sourceTree = "<group>"; };
|
||||
E8AC722A26F49580007D6E91 /* XPMineNotificaViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificaViewController.h; sourceTree = "<group>"; };
|
||||
E8AC722B26F49580007D6E91 /* XPMineNotificaViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotificaViewController.m; sourceTree = "<group>"; };
|
||||
E8AC722D26F49610007D6E91 /* XPMineNotificationItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificationItemModel.h; sourceTree = "<group>"; };
|
||||
E8AC722E26F49610007D6E91 /* XPMineNotificationItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotificationItemModel.m; sourceTree = "<group>"; };
|
||||
E8AC723026F49710007D6E91 /* XPMineNotificationTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificationTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8AC723126F49710007D6E91 /* XPMineNotificationTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotificationTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8AC723326F49939007D6E91 /* XPMineNotificaPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificaPresenter.h; sourceTree = "<group>"; };
|
||||
E8AC723426F49939007D6E91 /* XPMineNotificaPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotificaPresenter.m; sourceTree = "<group>"; };
|
||||
E8AC723626F49957007D6E91 /* XPMineNotificaProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificaProtocol.h; sourceTree = "<group>"; };
|
||||
E8AC723826F49AAE007D6E91 /* XPMineNotifyStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotifyStatus.h; sourceTree = "<group>"; };
|
||||
E8AC723926F49AAE007D6E91 /* XPMineNotifyStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotifyStatus.m; sourceTree = "<group>"; };
|
||||
E8B825B526E9A7D8009E8E9F /* BaseObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseObject.h; sourceTree = "<group>"; };
|
||||
E8B825B626E9A7D8009E8E9F /* BaseObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseObject.m; sourceTree = "<group>"; };
|
||||
E8B825BD26E9E57D009E8E9F /* LoginTicketInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginTicketInfo.h; sourceTree = "<group>"; };
|
||||
@@ -805,6 +847,12 @@
|
||||
children = (
|
||||
E8E70D9026F2F60C00F03460 /* XPMineItemModel.h */,
|
||||
E8E70D9126F2F60C00F03460 /* XPMineItemModel.m */,
|
||||
E8AC721726F46E0B007D6E91 /* XPMineSettingItemModel.h */,
|
||||
E8AC721826F46E0B007D6E91 /* XPMineSettingItemModel.m */,
|
||||
E8AC722D26F49610007D6E91 /* XPMineNotificationItemModel.h */,
|
||||
E8AC722E26F49610007D6E91 /* XPMineNotificationItemModel.m */,
|
||||
E8AC723826F49AAE007D6E91 /* XPMineNotifyStatus.h */,
|
||||
E8AC723926F49AAE007D6E91 /* XPMineNotifyStatus.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -816,6 +864,14 @@
|
||||
E8E70D7F26F2F39000F03460 /* SubViews */,
|
||||
E8E70D7526F2F15100F03460 /* XPMineViewController.h */,
|
||||
E8E70D7626F2F15100F03460 /* XPMineViewController.m */,
|
||||
E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */,
|
||||
E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */,
|
||||
E8AC721F26F47E23007D6E91 /* XPMineAboutUsViewController.h */,
|
||||
E8AC722026F47E23007D6E91 /* XPMineAboutUsViewController.m */,
|
||||
E8AC722226F47E5E007D6E91 /* XPMineFeedbackViewController.h */,
|
||||
E8AC722326F47E5E007D6E91 /* XPMineFeedbackViewController.m */,
|
||||
E8AC722A26F49580007D6E91 /* XPMineNotificaViewController.h */,
|
||||
E8AC722B26F49580007D6E91 /* XPMineNotificaViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -825,6 +881,12 @@
|
||||
children = (
|
||||
E8E70D7826F2F16600F03460 /* XPMinePresent.h */,
|
||||
E8E70D7926F2F16600F03460 /* XPMinePresent.m */,
|
||||
E8AC721A26F4720B007D6E91 /* XPMineSettingPresent.h */,
|
||||
E8AC721B26F4720B007D6E91 /* XPMineSettingPresent.m */,
|
||||
E8AC722526F482A4007D6E91 /* XPMineFeedbackPresenter.h */,
|
||||
E8AC722626F482A4007D6E91 /* XPMineFeedbackPresenter.m */,
|
||||
E8AC723326F49939007D6E91 /* XPMineNotificaPresenter.h */,
|
||||
E8AC723426F49939007D6E91 /* XPMineNotificaPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -833,6 +895,9 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8E70D7B26F2F18900F03460 /* XPMineProtocol.h */,
|
||||
E8AC721D26F4723D007D6E91 /* XPMineSettingProtocol.h */,
|
||||
E8AC722826F48889007D6E91 /* XPMineFeedbackProtocol.h */,
|
||||
E8AC723626F49957007D6E91 /* XPMineNotificaProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -857,6 +922,10 @@
|
||||
E8E70D8B26F2F5A500F03460 /* XPMineMatchCollectionViewCell.m */,
|
||||
E8E70D8D26F2F5DB00F03460 /* XPMineMenuTableViewCell.h */,
|
||||
E8E70D8E26F2F5DB00F03460 /* XPMineMenuTableViewCell.m */,
|
||||
E8AC721426F46B06007D6E91 /* XPMineSettingTableViewCell.h */,
|
||||
E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */,
|
||||
E8AC723026F49710007D6E91 /* XPMineNotificationTableViewCell.h */,
|
||||
E8AC723126F49710007D6E91 /* XPMineNotificationTableViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
@@ -992,6 +1061,10 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E8AC723726F49982007D6E91 /* XPMineNotificaProtocol.h in Sources */,
|
||||
E8AC723226F49710007D6E91 /* XPMineNotificationTableViewCell.m in Sources */,
|
||||
E8AC722926F488DA007D6E91 /* XPMineFeedbackProtocol.h in Sources */,
|
||||
E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */,
|
||||
E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */,
|
||||
E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */,
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
@@ -1005,11 +1078,14 @@
|
||||
E8E70D8926F2F58F00F03460 /* XPMineMatchTableViewCell.m in Sources */,
|
||||
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */,
|
||||
E8B825B726E9A7D8009E8E9F /* BaseObject.m in Sources */,
|
||||
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */,
|
||||
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
|
||||
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
|
||||
E81C27AB26EF2D920031E639 /* ThirdUserInfo.m in Sources */,
|
||||
E81C279D26EEEC620031E639 /* XPConstant.m in Sources */,
|
||||
187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */,
|
||||
E8AC721926F46E0B007D6E91 /* XPMineSettingItemModel.m in Sources */,
|
||||
189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */,
|
||||
189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */,
|
||||
E8E70D9226F2F60C00F03460 /* XPMineItemModel.m in Sources */,
|
||||
@@ -1018,7 +1094,10 @@
|
||||
E8E70D8326F2F51A00F03460 /* XPMineHeadView.m in Sources */,
|
||||
E8B825D026EA3825009E8E9F /* LoginPasswordViewController.m in Sources */,
|
||||
18E7B31826F097E00064BC9B /* UserInfoModel.m in Sources */,
|
||||
E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */,
|
||||
18E7B32126F098650064BC9B /* UserInfoSkillVo.m in Sources */,
|
||||
E8AC722726F482A4007D6E91 /* XPMineFeedbackPresenter.m in Sources */,
|
||||
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
|
||||
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */,
|
||||
189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */,
|
||||
189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */,
|
||||
@@ -1040,13 +1119,16 @@
|
||||
E8AC720D26F435F5007D6E91 /* UIImageView+LoadImage.m in Sources */,
|
||||
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */,
|
||||
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */,
|
||||
E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */,
|
||||
189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */,
|
||||
E8E70D8C26F2F5A500F03460 /* XPMineMatchCollectionViewCell.m in Sources */,
|
||||
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */,
|
||||
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
|
||||
E81366E726F0A49E0076364C /* NSString+Regex.m in Sources */,
|
||||
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
|
||||
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
|
||||
E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */,
|
||||
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */,
|
||||
E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */,
|
||||
187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */,
|
||||
@@ -1060,6 +1142,8 @@
|
||||
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
|
||||
E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */,
|
||||
187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */,
|
||||
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,
|
||||
E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */,
|
||||
189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */,
|
||||
E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */,
|
||||
18E7B29026EA0E6B0064BC9B /* FlutterBoost+Xplan.m in Sources */,
|
||||
|
22
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ming_setting_about_us@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ming_setting_about_us@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/ming_setting_about_us@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/ming_setting_about_us@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/ming_setting_about_us@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Mine/ming_setting_about_us.imageset/ming_setting_about_us@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (UIColor *)mainTextColor;
|
||||
/// 二级文字颜色 #C6C6E9
|
||||
+ (UIColor *)secondTextColor;
|
||||
///三级文字的颜色 #999999
|
||||
+ (UIColor *)textThirdColor;
|
||||
///分割线的颜色 #201F27
|
||||
+ (UIColor *)dividerColor;
|
||||
/// button 可用 渐变色的开始 #218EFF
|
||||
@@ -40,6 +42,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (UIColor *)disableButtonTextColor;
|
||||
///tabbar 没有点击的时候颜色555574
|
||||
+ (UIColor *)tabbarNormalColor;
|
||||
///重点标注颜色 0xf944a1
|
||||
+ (UIColor *)importantMarkColor;
|
||||
/// 开关按钮的 关闭的颜色 0x3d3d53
|
||||
+ (UIColor *)switchOffColor;
|
||||
/// 音游开关按钮的 开启的颜色 0x248cfe
|
||||
+ (UIColor *)switchOnColor;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -30,6 +30,10 @@
|
||||
+ (UIColor *)secondTextColor {
|
||||
return UIColorFromRGB(0xC6C6E9);
|
||||
}
|
||||
///三级文字的颜色 #999999
|
||||
+ (UIColor *)textThirdColor {
|
||||
return UIColorFromRGB(0x999999);
|
||||
}
|
||||
///分割线的颜色 #201F27
|
||||
+ (UIColor *)dividerColor {
|
||||
return UIColorFromRGB(0x201F27);
|
||||
@@ -70,5 +74,17 @@
|
||||
+ (UIColor *)tabbarNormalColor {
|
||||
return UIColorFromRGB(0x555574);
|
||||
}
|
||||
///重点标注颜色 0xf944a1
|
||||
+ (UIColor *)importantMarkColor {
|
||||
return UIColorFromRGB(0xf944a1);
|
||||
}
|
||||
/// 开关按钮的 关闭的颜色 0x3d3d53
|
||||
+ (UIColor *)switchOffColor {
|
||||
return UIColorFromRGB(0x3d3d53);
|
||||
}
|
||||
/// 音游开关按钮的 开启的颜色 0x248cfe
|
||||
+ (UIColor *)switchOnColor {
|
||||
return UIColorFromRGB(0x248cfe);
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -15,6 +15,9 @@ typedef NS_ENUM(NSUInteger, URLType) {
|
||||
kPrivacyURL,///隐私政策
|
||||
kUserProtocalURL, ///用户协议
|
||||
kUserInviteFriendURL, ///邀请好友
|
||||
kFAQURL,///帮助
|
||||
kIdentityURL,///实名认证
|
||||
kGameBindAccountURL,
|
||||
};
|
||||
|
||||
NSString * const URLWithType(URLType type);
|
||||
|
@@ -14,8 +14,10 @@ NSString * const URLWithType(URLType type) {
|
||||
NSDictionary * dic = @{
|
||||
@(kPrivacyURL): @"modules/rule/privacy-wap.html",
|
||||
@(kUserProtocalURL) : @"modules/rule/protocol.html",
|
||||
@(kUserInviteFriendURL): @"modules/game/index.html"
|
||||
|
||||
@(kUserInviteFriendURL): @"modules/game/index.html",
|
||||
@(kFAQURL) : @"modules/rule/guide.html ",//常见问题
|
||||
@(kIdentityURL):@"modules/identity/new.html",//实人认证
|
||||
@(kGameBindAccountURL):@"modules/game/bindAccount.html",///绑定账号
|
||||
};
|
||||
NSString * url = [dic objectForKey:@(type)];
|
||||
|
||||
|
@@ -10,7 +10,31 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (Mine)
|
||||
/// 保存反馈的信息
|
||||
/// @param complection 完成
|
||||
/// @param feedbackDesc 反馈的内容
|
||||
/// @param contact 联系方式
|
||||
/// @param uid uid
|
||||
/// @param ticket ticket
|
||||
+ (void)saveFeedBackWith:(HttpRequestHelperCompletion)complection
|
||||
feedbackDesc:(NSString *)feedbackDesc
|
||||
contact:(NSString *)contact
|
||||
uid:(NSString *)uid
|
||||
ticket:(NSString *)ticket;
|
||||
|
||||
/// 查询当前用户开启通知的状态
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)requestUserInfoNotifyStatus:(HttpRequestHelperCompletion)complection
|
||||
uid:(NSString *)uid;
|
||||
|
||||
/// 更新系统通知
|
||||
/// @param complection 完成
|
||||
/// @param sysMsgNotify 状态
|
||||
/// @param uid 用户的uid
|
||||
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)complection
|
||||
sysMsgNotify:(NSString *)sysMsgNotify
|
||||
uid:(NSString *)uid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -9,4 +9,35 @@
|
||||
|
||||
@implementation Api (Mine)
|
||||
|
||||
|
||||
/// 保存反馈的信息
|
||||
/// @param complection 完成
|
||||
/// @param feedbackDesc 反馈的内容
|
||||
/// @param contact 联系方式
|
||||
/// @param uid uid
|
||||
/// @param ticket ticket
|
||||
+ (void)saveFeedBackWith:(HttpRequestHelperCompletion)complection
|
||||
feedbackDesc:(NSString *)feedbackDesc
|
||||
contact:(NSString *)contact
|
||||
uid:(NSString *)uid
|
||||
ticket:(NSString *)ticket {
|
||||
[self makeRequest:@"feedback" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, feedbackDesc, contact, uid, ticket, nil];
|
||||
}
|
||||
|
||||
|
||||
/// 查询当前用户开启通知的状态
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)requestUserInfoNotifyStatus:(HttpRequestHelperCompletion)complection uid:(NSString *)uid {
|
||||
[self makeRequest:@"user/msgNotify" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
|
||||
/// 更新系统通知
|
||||
/// @param complection 完成
|
||||
/// @param sysMsgNotify 状态
|
||||
/// @param uid 用户的uid
|
||||
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)complection sysMsgNotify:(NSString *)sysMsgNotify uid:(NSString *)uid {
|
||||
[self makeRequest:@"user/sysMsgNotify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, sysMsgNotify,uid, nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -20,6 +20,9 @@ typedef NS_ENUM(NSInteger, XPMineItemType) {
|
||||
XPMineItemType_My_Level,///我的等级
|
||||
XPMineItemType_Teenager_Mode, ///青少年模式
|
||||
XPMineItemType_Real_Name_Authentic,///实名认证
|
||||
XPMineItemType_Account,///我的账户
|
||||
XPMineItemType_Invite_Friend,///邀请好友
|
||||
XPMineItemType_Personinfo,///个人中心
|
||||
};
|
||||
|
||||
|
||||
|
21
xplan-ios/Main/Mine/Model/XPMineNotificationItemModel.h
Normal file
21
xplan-ios/Main/Mine/Model/XPMineNotificationItemModel.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMineNotificationItemModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseObject.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineNotificationItemModel : BaseObject
|
||||
/// 标题
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
/// 描述
|
||||
@property (nonatomic, copy) NSString *desc;
|
||||
/// 是否开启
|
||||
@property (nonatomic, assign) BOOL notification;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/Model/XPMineNotificationItemModel.m
Normal file
12
xplan-ios/Main/Mine/Model/XPMineNotificationItemModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPMineNotificationItemModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineNotificationItemModel.h"
|
||||
|
||||
@implementation XPMineNotificationItemModel
|
||||
|
||||
@end
|
17
xplan-ios/Main/Mine/Model/XPMineNotifyStatus.h
Normal file
17
xplan-ios/Main/Mine/Model/XPMineNotifyStatus.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPMineNotifyStatus.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseObject.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineNotifyStatus : BaseObject
|
||||
///系统消息通知
|
||||
@property (nonatomic, assign) BOOL sysMsgNotify;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/Model/XPMineNotifyStatus.m
Normal file
12
xplan-ios/Main/Mine/Model/XPMineNotifyStatus.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPMineNotifyStatus.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineNotifyStatus.h"
|
||||
|
||||
@implementation XPMineNotifyStatus
|
||||
|
||||
@end
|
31
xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h
Normal file
31
xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// XPMineSettingItemModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, XPMineSettingItemType){
|
||||
XPMineSettingItemType_Phone, ///手机号
|
||||
XPMineSettingItemType_Pay_Password,///支付密码
|
||||
XPMineSettingItemType_Notification_Remind, ///通知提醒
|
||||
XPMineSettingItemType_Helper,///帮助
|
||||
XPMineSettingItemType_Feedback,//我要反馈
|
||||
XPMineSettingItemType_Clear_Memory,///清楚缓存
|
||||
XPMineSettingItemType_About_Us,///关于我们
|
||||
};
|
||||
|
||||
@interface XPMineSettingItemModel : NSObject
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///副标题
|
||||
@property (nonatomic,copy,) NSString * __nullable subTitle;
|
||||
///类型
|
||||
@property (nonatomic,assign) XPMineSettingItemType type;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/Model/XPMineSettingItemModel.m
Normal file
12
xplan-ios/Main/Mine/Model/XPMineSettingItemModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPMineSettingItemModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineSettingItemModel.h"
|
||||
|
||||
@implementation XPMineSettingItemModel
|
||||
|
||||
@end
|
20
xplan-ios/Main/Mine/Presenter/XPMineFeedbackPresenter.h
Normal file
20
xplan-ios/Main/Mine/Presenter/XPMineFeedbackPresenter.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// XPFeedbackPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFeedbackPresenter : BaseMvpPresenter
|
||||
|
||||
/// 保存反馈
|
||||
/// @param feedback 反馈的内容
|
||||
/// @param contact 反馈的联系方式
|
||||
- (void)saveFeedBackWith:(NSString *)feedback contact:(NSString *)contact;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
29
xplan-ios/Main/Mine/Presenter/XPMineFeedbackPresenter.m
Normal file
29
xplan-ios/Main/Mine/Presenter/XPMineFeedbackPresenter.m
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// XPFeedbackPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineFeedbackPresenter.h"
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
///Api
|
||||
#import "Api+Mine.h"
|
||||
///P
|
||||
#import "XPMineFeedbackProtocol.h"
|
||||
|
||||
@implementation XPMineFeedbackPresenter
|
||||
|
||||
/// 保存反馈
|
||||
/// @param feedback 反馈的内容
|
||||
/// @param contact 反馈的联系方式
|
||||
- (void)saveFeedBackWith:(NSString *)feedback contact:(NSString *)contact {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api saveFeedBackWith:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] saveFeedbackSuccess];
|
||||
} feedbackDesc:feedback contact:contact uid:uid ticket:ticket];
|
||||
}
|
||||
|
||||
@end
|
20
xplan-ios/Main/Mine/Presenter/XPMineNotificaPresenter.h
Normal file
20
xplan-ios/Main/Mine/Presenter/XPMineNotificaPresenter.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// XPMineNotificaPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPMineNotificationItemModel;
|
||||
@interface XPMineNotificaPresenter : BaseMvpPresenter
|
||||
/// 请求当前开关的状态
|
||||
- (void)requestUserInfoNotifyStatus;
|
||||
|
||||
/// 更新系统消息状态
|
||||
- (void)updateUserInfoSystemNotify:(BOOL)notify;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
61
xplan-ios/Main/Mine/Presenter/XPMineNotificaPresenter.m
Normal file
61
xplan-ios/Main/Mine/Presenter/XPMineNotificaPresenter.m
Normal file
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// XPMineNotificaPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineNotificaPresenter.h"
|
||||
///Api
|
||||
#import "Api+Mine.h"
|
||||
///P
|
||||
#import "XPMineNotificaProtocol.h"
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
///Model
|
||||
#import "XPMineNotifyStatus.h"
|
||||
#import "XPMineNotificationItemModel.h"
|
||||
|
||||
@interface XPMineNotificaPresenter ()
|
||||
///系统消息
|
||||
@property (nonatomic,strong) XPMineNotificationItemModel *systemModel;
|
||||
@end
|
||||
|
||||
@implementation XPMineNotificaPresenter
|
||||
|
||||
- (id<XPMineNotificaProtocol>)getView {
|
||||
return (id<XPMineNotificaProtocol>)[super getView];
|
||||
}
|
||||
|
||||
|
||||
/// 请求当前开关的状态
|
||||
- (void)requestUserInfoNotifyStatus {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api requestUserInfoNotifyStatus:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
XPMineNotifyStatus * model = [XPMineNotifyStatus modelWithDictionary:data.data];
|
||||
if (self.systemModel == nil) {
|
||||
XPMineNotificationItemModel * systemItem = [[XPMineNotificationItemModel alloc] init];
|
||||
systemItem.title = @"系统通知";
|
||||
systemItem.desc = @"关闭后,系统消息和官方小秘书不再提示";
|
||||
self.systemModel = systemItem;
|
||||
}
|
||||
self.systemModel.notification = model.sysMsgNotify;
|
||||
NSArray * array = @[self.systemModel];
|
||||
[[self getView] requestUserInfoNotifyStatusSuccess:array];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
/// 更新系统消息状态
|
||||
- (void)updateUserInfoSystemNotify:(BOOL)notify {
|
||||
NSString * notifyStr = [NSString stringWithFormat:@"%d", notify];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api updateUserInfoSystemNotifyWith:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
}] sysMsgNotify:notifyStr uid:uid];
|
||||
}
|
||||
|
||||
@end
|
@@ -57,13 +57,13 @@
|
||||
XPMineItemModel * teenagerItem = [[XPMineItemModel alloc] init];
|
||||
teenagerItem.itmeName = @"青少年模式";
|
||||
teenagerItem.itmeImageName = @"mine_normal_teenager";
|
||||
teenagerItem.type = XPMineItemType_Match_Shopping;
|
||||
teenagerItem.type = XPMineItemType_Teenager_Mode;
|
||||
teenagerItem.cornerType = UIRectCornerTopLeft | UIRectCornerTopRight;
|
||||
|
||||
XPMineItemModel * realNameItem = [[XPMineItemModel alloc] init];
|
||||
realNameItem.itmeName = @"使命认证";
|
||||
realNameItem.itmeName = @"实名认证";
|
||||
realNameItem.itmeImageName = @"mine_normal_real_name_authentic";
|
||||
realNameItem.type = XPMineItemType_Match_Relevance_Account;
|
||||
realNameItem.type = XPMineItemType_Real_Name_Authentic;
|
||||
realNameItem.cornerType = UIRectCornerBottomLeft | UIRectCornerBottomRight;
|
||||
NSArray * array = @[teenagerItem, realNameItem];
|
||||
[[self getView] onGetNormalItemsSuccess:array];
|
||||
|
23
xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.h
Normal file
23
xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPMineSettingPresent.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class UserInfoModel;
|
||||
@interface XPMineSettingPresent : BaseMvpPresenter
|
||||
|
||||
/// 获取用户信息
|
||||
- (void)getUserInfo;
|
||||
|
||||
/// 获取数据源
|
||||
/// @param userinfo 当前的用户信息
|
||||
- (void)getMineSettingDataSourceWith:(UserInfoModel *)userinfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
98
xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m
Normal file
98
xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m
Normal file
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// XPMineSettingPresent.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineSettingPresent.h"
|
||||
#import "Api+Mine.h"
|
||||
///P
|
||||
#import "XPMineSettingProtocol.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "XPMineSettingItemModel.h"
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
|
||||
@interface XPMineSettingPresent ()
|
||||
///手机号
|
||||
@property (nonatomic,strong) XPMineSettingItemModel *phoneItem;
|
||||
///支付密码
|
||||
@property (nonatomic,strong) XPMineSettingItemModel *payItem;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasouce;
|
||||
@end
|
||||
|
||||
@implementation XPMineSettingPresent
|
||||
- (id<XPMineSettingProtocol>)getView {
|
||||
return (id<XPMineSettingProtocol>) [super getView];
|
||||
}
|
||||
|
||||
|
||||
/// 获取数据源
|
||||
/// @param userinfo 当前的用户信息
|
||||
- (void)getMineSettingDataSourceWith:(UserInfoModel *)userinfo {
|
||||
if (self.datasouce.count > 0) {
|
||||
self.phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : @"设置";
|
||||
self.payItem.subTitle = userinfo.isBindPaymentPwd ? @"修改" : @"设置";
|
||||
} else {
|
||||
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
|
||||
phoneItem.title = @"手机号码";
|
||||
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : @"设置";
|
||||
phoneItem.type = XPMineSettingItemType_Phone;
|
||||
self.phoneItem = phoneItem;
|
||||
|
||||
XPMineSettingItemModel * payItem = [[XPMineSettingItemModel alloc] init];
|
||||
payItem.title = @"支付密码";
|
||||
payItem.subTitle = userinfo.isBindPaymentPwd ? @"修改" : @"设置";
|
||||
payItem.type = XPMineSettingItemType_Pay_Password;
|
||||
self.payItem = payItem;
|
||||
|
||||
XPMineSettingItemModel * notificaItem = [[XPMineSettingItemModel alloc] init];
|
||||
notificaItem.title = @"通知提醒设置";
|
||||
notificaItem.subTitle = @"设置";
|
||||
notificaItem.type = XPMineSettingItemType_Notification_Remind;
|
||||
|
||||
XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init];
|
||||
helperItem.title = @"帮助";
|
||||
helperItem.subTitle = @"";
|
||||
helperItem.type = XPMineSettingItemType_Helper;
|
||||
|
||||
XPMineSettingItemModel * feedbackItem = [[XPMineSettingItemModel alloc] init];
|
||||
feedbackItem.title = @"我要反馈";
|
||||
feedbackItem.subTitle = @"";
|
||||
feedbackItem.type = XPMineSettingItemType_Feedback;
|
||||
|
||||
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
|
||||
clearMemoryItem.title = @"清除缓存";
|
||||
clearMemoryItem.subTitle = @"";
|
||||
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
|
||||
|
||||
XPMineSettingItemModel * aboutusItem = [[XPMineSettingItemModel alloc] init];
|
||||
aboutusItem.title = @"关于音游";
|
||||
aboutusItem.subTitle = @"";
|
||||
aboutusItem.type = XPMineSettingItemType_About_Us;
|
||||
|
||||
NSArray * oneSection = @[phoneItem];
|
||||
NSArray * twoSection = @[payItem, notificaItem];
|
||||
NSArray * threeSection = @[helperItem, feedbackItem, clearMemoryItem, aboutusItem];
|
||||
|
||||
self.datasouce = @[oneSection, twoSection, threeSection];
|
||||
}
|
||||
|
||||
[[self getView] getMineSettingDatasourceSuccess:self.datasouce];
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
- (void)getUserInfo {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] onGetUserInfoSuccess:infoModel];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
@end
|
19
xplan-ios/Main/Mine/Protocol/XPMineFeedbackProtocol.h
Normal file
19
xplan-ios/Main/Mine/Protocol/XPMineFeedbackProtocol.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPMineFeedbackProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMineFeedbackProtocol <NSObject>
|
||||
|
||||
///保存反馈成功
|
||||
- (void)saveFeedbackSuccess;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
17
xplan-ios/Main/Mine/Protocol/XPMineNotificaProtocol.h
Normal file
17
xplan-ios/Main/Mine/Protocol/XPMineNotificaProtocol.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPMineNotificaProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPMineNotifyStatus, XPMineNotificationItemModel;
|
||||
@protocol XPMineNotificaProtocol <NSObject>
|
||||
///获取当前开关的状态成功
|
||||
- (void)requestUserInfoNotifyStatusSuccess:(NSArray<XPMineNotificationItemModel *> *)array;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
20
xplan-ios/Main/Mine/Protocol/XPMineSettingProtocol.h
Normal file
20
xplan-ios/Main/Mine/Protocol/XPMineSettingProtocol.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// XPMineSettingProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMineSettingProtocol <NSObject>
|
||||
|
||||
/// 获取数据成功
|
||||
- (void)getMineSettingDatasourceSuccess:(NSArray *)array;
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPMineNotificationTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPMineNotificationTableViewCell, XPMineNotificationItemModel;
|
||||
@protocol XPMineNotificationTableViewCellDelegate <NSObject>
|
||||
///开关
|
||||
- (void)xPMineNotificationTableViewCell:(XPMineNotificationTableViewCell *)cell switchStatus:(BOOL)status;
|
||||
|
||||
@end
|
||||
@interface XPMineNotificationTableViewCell : UITableViewCell
|
||||
/** */
|
||||
@property (nonatomic,weak) id<XPMineNotificationTableViewCellDelegate> delegate;
|
||||
///
|
||||
@property (nonatomic,strong) XPMineNotificationItemModel *itemModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
104
xplan-ios/Main/Mine/View/Cell/XPMineNotificationTableViewCell.m
Normal file
104
xplan-ios/Main/Mine/View/Cell/XPMineNotificationTableViewCell.m
Normal file
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// XPMineNotificationTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineNotificationTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "XPMineNotificationItemModel.h"
|
||||
|
||||
@interface XPMineNotificationTableViewCell ()
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@property (nonatomic, strong) UILabel *subtitleLabel;
|
||||
@property (nonatomic, strong) UISwitch *selectSwitch;
|
||||
@end
|
||||
|
||||
@implementation XPMineNotificationTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self initSubviews];
|
||||
[self makeConstriants];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - event
|
||||
- (void)switchDidTapped:(UISwitch *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineNotificationTableViewCell:switchStatus:)]) {
|
||||
[self.delegate xPMineNotificationTableViewCell:self switchStatus:sender.state];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - private
|
||||
- (void)initSubviews {
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.subtitleLabel];
|
||||
[self.contentView addSubview:self.selectSwitch];
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
}
|
||||
|
||||
- (void)makeConstriants {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.top.mas_equalTo(14);
|
||||
}];
|
||||
[self.subtitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.titleLabel);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(8);
|
||||
}];
|
||||
[self.selectSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView).offset(-15);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getter && Setter
|
||||
|
||||
- (void)setItemModel:(XPMineNotificationItemModel *)itemModel {
|
||||
_itemModel = itemModel;
|
||||
self.titleLabel.text = _itemModel.title;
|
||||
self.subtitleLabel.text = _itemModel.desc;
|
||||
self.selectSwitch.on = _itemModel.notification;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)subtitleLabel {
|
||||
if (!_subtitleLabel) {
|
||||
_subtitleLabel = [[UILabel alloc] init];
|
||||
_subtitleLabel.font = [UIFont systemFontOfSize:12];
|
||||
_subtitleLabel.textColor = [ThemeColor secondTextColor];
|
||||
}
|
||||
return _subtitleLabel;
|
||||
}
|
||||
|
||||
- (UISwitch *)selectSwitch {
|
||||
if (_selectSwitch == nil) {
|
||||
_selectSwitch = [[UISwitch alloc] init];
|
||||
_selectSwitch.onTintColor = [ThemeColor switchOnColor];
|
||||
_selectSwitch.tintColor = [ThemeColor switchOffColor];
|
||||
_selectSwitch.backgroundColor = [UIColor clearColor];
|
||||
_selectSwitch.layer.cornerRadius = CGRectGetHeight(_selectSwitch.frame)/2.0;
|
||||
_selectSwitch.layer.masksToBounds = YES;
|
||||
[_selectSwitch addTarget:self action:@selector(switchDidTapped:) forControlEvents:UIControlEventValueChanged];
|
||||
}
|
||||
return _selectSwitch;
|
||||
}
|
||||
|
||||
@end
|
17
xplan-ios/Main/Mine/View/Cell/XPMineSettingTableViewCell.h
Normal file
17
xplan-ios/Main/Mine/View/Cell/XPMineSettingTableViewCell.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPMineSettingTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPMineSettingItemModel;
|
||||
@interface XPMineSettingTableViewCell : UITableViewCell
|
||||
///数据源
|
||||
@property (nonatomic,strong) XPMineSettingItemModel *itemModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
120
xplan-ios/Main/Mine/View/Cell/XPMineSettingTableViewCell.m
Normal file
120
xplan-ios/Main/Mine/View/Cell/XPMineSettingTableViewCell.m
Normal file
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// XPMineSettingTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineSettingTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "XPMineSettingItemModel.h"
|
||||
|
||||
@interface XPMineSettingTableViewCell ()
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///副标题
|
||||
@property (nonatomic,strong) UILabel *subTitleLabel;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIImageView *arrowImageView;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * partLineView;
|
||||
@end
|
||||
|
||||
@implementation XPMineSettingTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.contentView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.stackView];
|
||||
[self.contentView addSubview:self.partLineView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.titleLabel];
|
||||
[self.stackView addArrangedSubview:self.subTitleLabel];
|
||||
[self.stackView addArrangedSubview:self.arrowImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.partLineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.stackView);
|
||||
make.height.mas_equalTo(1);
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setItemModel:(XPMineSettingItemModel *)itemModel {
|
||||
_itemModel = itemModel;
|
||||
self.titleLabel.text = _itemModel.title;
|
||||
self.subTitleLabel.text = _itemModel.subTitle;
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
_stackView.spacing = 10;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_titleLabel.textColor = [ThemeColor secondTextColor];
|
||||
[_titleLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
- (UILabel *)subTitleLabel {
|
||||
if (!_subTitleLabel) {
|
||||
_subTitleLabel = [[UILabel alloc] init];
|
||||
_subTitleLabel.font = [UIFont systemFontOfSize:12];
|
||||
_subTitleLabel.textColor = [ThemeColor textThirdColor];
|
||||
_subTitleLabel.textAlignment = NSTextAlignmentRight;
|
||||
}
|
||||
return _subTitleLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)arrowImageView {
|
||||
if (!_arrowImageView) {
|
||||
_arrowImageView = [[UIImageView alloc] init];
|
||||
_arrowImageView.userInteractionEnabled = YES;
|
||||
_arrowImageView.image = [UIImage imageNamed:@"mine_item_arrow"];
|
||||
[_arrowImageView setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[_arrowImageView setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
return _arrowImageView;
|
||||
}
|
||||
|
||||
- (UIView *)partLineView {
|
||||
if (!_partLineView) {
|
||||
_partLineView = [[UIView alloc] init];
|
||||
_partLineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _partLineView;
|
||||
}
|
||||
|
||||
@end
|
@@ -8,9 +8,20 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPMineAccountSubView: UIView
|
||||
///显示名字
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///免费门票
|
||||
@property (nonatomic,strong) UIButton *freeTicketButton;
|
||||
@end
|
||||
|
||||
@interface XPMineAccountView : UIView
|
||||
|
||||
///我的账户
|
||||
@property (nonatomic,strong, readonly) XPMineAccountSubView *accountView;
|
||||
///推荐好友
|
||||
@property (nonatomic,strong, readonly) XPMineAccountSubView *recommendView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -12,16 +12,6 @@
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
|
||||
@interface XPMineAccountSubView: UIView
|
||||
///显示名字
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///免费门票
|
||||
@property (nonatomic,strong) UIButton *freeTicketButton;
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPMineAccountSubView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
|
@@ -12,7 +12,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol XPMineHeadViewDelegate <NSObject>
|
||||
///点击了头像
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAvatar:(UserInfoModel *)info;
|
||||
|
||||
//点击我的账户
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAccount:(UserInfoModel *)info;
|
||||
//点击邀请好友
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickInviteFriend:(UserInfoModel *)info;
|
||||
@end
|
||||
@interface XPMineHeadView : UIView
|
||||
///用户信息
|
||||
|
@@ -12,6 +12,7 @@
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIImageView+LoadImage.h"
|
||||
///View
|
||||
#import "XPMineAccountView.h"
|
||||
///Model
|
||||
@@ -57,6 +58,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tapAccountView {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineHeadView:didClickAccount:)]) {
|
||||
[self.delegate xPMineHeadView:self didClickAccount:self.userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tapRecommendView {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineHeadView:didClickInviteFriend:)]) {
|
||||
[self.delegate xPMineHeadView:self didClickInviteFriend:self.userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
@@ -73,6 +86,12 @@
|
||||
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAvatarImageView)];
|
||||
[self.avatarImageView addGestureRecognizer:tap];
|
||||
|
||||
UITapGestureRecognizer * accountTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAccountView)];
|
||||
[self.accountView.accountView addGestureRecognizer:accountTap];
|
||||
|
||||
UITapGestureRecognizer * recommendTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecommendView)];
|
||||
[self.accountView.recommendView addGestureRecognizer:recommendTap];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -110,11 +129,12 @@
|
||||
if (_userInfo) {
|
||||
self.idLabel.text = [NSString stringWithFormat:@"音游号:%ld", (long)_userInfo.erbanNo];
|
||||
self.nameLabel.text = _userInfo.nick.length > 0 ? _userInfo.nick : @"";
|
||||
[self.avatarImageView load_setImageImageWithUrl:_userInfo.avatar placeholderImage:[UIImageConstant defaultAvatarPlaceholder]];
|
||||
NSString * sexName;
|
||||
if (userInfo.gender == GenderType_Male) {
|
||||
sexName = @"";
|
||||
sexName = @"common_male";
|
||||
} else {
|
||||
sexName = @"";
|
||||
sexName = @"common_female";
|
||||
}
|
||||
self.sexImageView.image = [UIImage imageNamed:sexName];
|
||||
}
|
||||
|
16
xplan-ios/Main/Mine/View/XPMineAboutUsViewController.h
Normal file
16
xplan-ios/Main/Mine/View/XPMineAboutUsViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMineAboutUsViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineAboutUsViewController : BaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
85
xplan-ios/Main/Mine/View/XPMineAboutUsViewController.m
Normal file
85
xplan-ios/Main/Mine/View/XPMineAboutUsViewController.m
Normal file
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// XPMineAboutUsViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineAboutUsViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "YYUtility.h"
|
||||
#import "XPMacro.h"
|
||||
|
||||
@interface XPMineAboutUsViewController ()
|
||||
@property (nonatomic, strong) UIImageView *iconImageView;//图标
|
||||
@property (strong, nonatomic) UILabel *versionLabel;//版本
|
||||
@property (strong , nonatomic) UILabel *nameLabel;
|
||||
@end
|
||||
|
||||
@implementation XPMineAboutUsViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = [NSString stringWithFormat:@"关于%@",AppName];
|
||||
[self initSubViews];
|
||||
[self makeConstriants];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.versionLabel];
|
||||
[self.view addSubview:self.iconImageView];
|
||||
[self.view addSubview:self.nameLabel];
|
||||
}
|
||||
|
||||
- (void)makeConstriants {
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(kNavigationHeight+60);
|
||||
}];
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.iconImageView.mas_bottom).offset(5);
|
||||
}];
|
||||
[self.versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(5);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Getter && Setter
|
||||
|
||||
- (UIImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[UIImageView alloc] init];
|
||||
_iconImageView.image = [UIImage imageNamed:@"ming_setting_about_us"];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)versionLabel {
|
||||
if (!_versionLabel) {
|
||||
_versionLabel = [[UILabel alloc] init];
|
||||
_versionLabel.font = [UIFont systemFontOfSize:12];
|
||||
_versionLabel.textColor = [ThemeColor mainTextColor];
|
||||
_versionLabel.text = [NSString stringWithFormat:@"V%@",[YYUtility appVersion]];
|
||||
}
|
||||
return _versionLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)nameLabel {
|
||||
if (!_nameLabel) {
|
||||
_nameLabel = [[UILabel alloc] init];
|
||||
_nameLabel.text = AppName;
|
||||
_nameLabel.textColor = [ThemeColor secondTextColor];
|
||||
_nameLabel.font = [UIFont systemFontOfSize:17];
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
|
||||
|
||||
@end
|
16
xplan-ios/Main/Mine/View/XPMineFeedbackViewController.h
Normal file
16
xplan-ios/Main/Mine/View/XPMineFeedbackViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMineFeedbackViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineFeedbackViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
174
xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m
Normal file
174
xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m
Normal file
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// XPMineFeedbackViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineFeedbackViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <SZTextView/SZTextView.h>
|
||||
#import <ReactiveObjC/ReactiveObjC.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///P
|
||||
#import "XPMineFeedbackProtocol.h"
|
||||
#import "XPMineFeedbackPresenter.h"
|
||||
|
||||
@interface XPMineFeedbackViewController ()
|
||||
///小红点
|
||||
@property (nonatomic, strong) UIView *pointView;
|
||||
///内容
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
///输入反馈的内容
|
||||
@property (nonatomic, strong) SZTextView *contentTextView;
|
||||
///微信或者qq
|
||||
@property (nonatomic, strong) UITextField *contactField;
|
||||
///提交
|
||||
@property (nonatomic, strong) UIButton *submitBtn;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMineFeedbackViewController
|
||||
|
||||
- (XPMineFeedbackPresenter *)createPresenter {
|
||||
return [[XPMineFeedbackPresenter alloc] init];;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = @"反馈";
|
||||
[self initSubviews];
|
||||
[self makeConstriants];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubviews {
|
||||
[self.view addSubview:self.pointView];
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.view addSubview:self.contentTextView];
|
||||
[self.view addSubview:self.contactField];
|
||||
[self.view addSubview:self.submitBtn];
|
||||
|
||||
}
|
||||
|
||||
- (void)makeConstriants {
|
||||
[self.pointView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.view).offset(15);
|
||||
make.top.mas_equalTo(kNavigationHeight+17);
|
||||
make.height.width.mas_equalTo(7);
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.pointView.mas_right).offset(4);
|
||||
make.centerY.mas_equalTo(self.pointView);
|
||||
}];
|
||||
[self.contentTextView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.pointView.mas_bottom).offset(20);
|
||||
make.left.mas_equalTo(self.view).offset(15);
|
||||
make.right.mas_equalTo(self.view).offset(-15);
|
||||
make.height.mas_equalTo(154);
|
||||
}];
|
||||
[self.contactField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentTextView.mas_bottom).offset(10);
|
||||
make.left.right.mas_equalTo(self.contentTextView);
|
||||
make.height.mas_equalTo(35);
|
||||
}];
|
||||
[self.submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contactField.mas_bottom).offset(45);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(45);
|
||||
make.width.mas_equalTo(310);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initEvents {
|
||||
@weakify(self);
|
||||
RAC(self.submitBtn, enabled) = [RACSignal combineLatest:@[self.contentTextView.rac_textSignal, self.contactField.rac_textSignal] reduce:^id _Nonnull(NSString *content, NSString * contact){
|
||||
return @(content.length > 0 && contact.length > 0);
|
||||
}];
|
||||
|
||||
[[self.submitBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
|
||||
@strongify(self);
|
||||
[self.presenter saveFeedBackWith:self.contentTextView.text contact:self.contactField.text];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - FeedbackCoreClient
|
||||
- (void)saveFeedbackSuccess {
|
||||
[self showSuccessToast:[NSString stringWithFormat:@"感谢您的宝贵意见,让我们共同营造更好的%@", AppName]];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Getter && Setter
|
||||
|
||||
- (UIView *)pointView {
|
||||
if (!_pointView) {
|
||||
_pointView = [[UIView alloc] init];
|
||||
_pointView.backgroundColor = [ThemeColor importantMarkColor];
|
||||
_pointView.layer.masksToBounds = YES;
|
||||
_pointView.layer.cornerRadius = 3.5;
|
||||
}
|
||||
return _pointView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"问题描述";
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
|
||||
- (SZTextView *)contentTextView {
|
||||
if (!_contentTextView) {
|
||||
_contentTextView = [[SZTextView alloc] init];
|
||||
_contentTextView.placeholder = @"请详细描述您所遇到的问题与情况,感谢您提出宝贵的意见。";
|
||||
_contentTextView.textColor = [ThemeColor mainTextColor];
|
||||
_contentTextView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_contentTextView.placeholderTextColor = [ThemeColor secondTextColor];
|
||||
_contentTextView.font = [UIFont systemFontOfSize:14];
|
||||
_contentTextView.layer.cornerRadius = 3;
|
||||
}
|
||||
return _contentTextView;
|
||||
}
|
||||
|
||||
- (UITextField *)contactField {
|
||||
if (!_contactField) {
|
||||
_contactField = [[UITextField alloc] init];
|
||||
NSString * placeholder = @"请输入您的QQ或微信号";
|
||||
_contactField.attributedText = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:14], NSForegroundColorAttributeName : [ThemeColor secondTextColor]}];;
|
||||
_contactField.font = [UIFont systemFontOfSize:14];
|
||||
_contactField.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_contactField.textColor = [ThemeColor mainTextColor];
|
||||
_contactField.layer.cornerRadius = 3;
|
||||
_contactField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 8, 0)];
|
||||
_contactField.leftViewMode = UITextFieldViewModeAlways;
|
||||
}
|
||||
return _contactField;
|
||||
}
|
||||
|
||||
- (UIButton *)submitBtn {
|
||||
if (!_submitBtn) {
|
||||
_submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_submitBtn.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_submitBtn setTitle:@"提交反馈" forState:UIControlStateNormal];
|
||||
[_submitBtn setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
[_submitBtn setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
|
||||
_submitBtn.layer.masksToBounds = YES;
|
||||
_submitBtn.layer.cornerRadius = 45/2;
|
||||
[_submitBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
[_submitBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor disableButtonColor], [ThemeColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled];
|
||||
_submitBtn.enabled = NO;
|
||||
|
||||
}
|
||||
return _submitBtn;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Mine/View/XPMineNotificaViewController.h
Normal file
16
xplan-ios/Main/Mine/View/XPMineNotificaViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMineNotificaViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineNotificaViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
154
xplan-ios/Main/Mine/View/XPMineNotificaViewController.m
Normal file
154
xplan-ios/Main/Mine/View/XPMineNotificaViewController.m
Normal file
@@ -0,0 +1,154 @@
|
||||
//
|
||||
// XPMineNotificaViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineNotificaViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
///Model
|
||||
#import "XPMineNotificationItemModel.h"
|
||||
///View
|
||||
#import "XPMineNotificationTableViewCell.h"
|
||||
///P
|
||||
#import "XPMineNotificaProtocol.h"
|
||||
#import "XPMineNotificaPresenter.h"
|
||||
|
||||
@interface XPMineNotificaViewController ()<XPMineNotificaProtocol, XPMineNotificationTableViewCellDelegate, UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) NSArray<XPMineNotificationItemModel *> *dataModelArray;
|
||||
///
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
@end
|
||||
|
||||
@implementation XPMineNotificaViewController
|
||||
|
||||
- (XPMineNotificaPresenter *)createPresenter {
|
||||
return [[XPMineNotificaPresenter alloc] init];
|
||||
}
|
||||
|
||||
#pragma mark - Life Cycle
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self.presenter requestUserInfoNotifyStatus];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"通知提醒设置";
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
|
||||
/// 获取系统通知权限
|
||||
- (BOOL)systemNotify {
|
||||
#warning to do 需要实现的
|
||||
/*
|
||||
SecretarySystemUIDs *uids = GetCore(ImFriendCore).secretarySystemUIDs;
|
||||
if (uids == nil) {
|
||||
//uid为空时,获取、缓存
|
||||
[GetCore(ImFriendCore) requestSecretarySystemUIDsWithCompletion:nil];
|
||||
return NO;
|
||||
}
|
||||
|
||||
BOOL secretaryNotify = [GetCore(ImFriendCore) notifyForNewMsg:uids.secretaryUid];
|
||||
BOOL systemNotify = [GetCore(ImFriendCore) notifyForNewMsg:uids.systemMessageUid];
|
||||
|
||||
return secretaryNotify && systemNotify;
|
||||
*/
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataModelArray.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMineNotificationItemModel *item = [self.dataModelArray objectAtIndex:indexPath.row];
|
||||
XPMineNotificationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNotificationTableViewCell class]) forIndexPath:indexPath];
|
||||
cell.delegate = self;
|
||||
cell.itemModel = item;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 70;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private
|
||||
/// 获取手机推送权限
|
||||
+ (void)mobilePushAuthority:(void(^)(BOOL isAuthority))authority {
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
|
||||
|
||||
BOOL permission = settings.authorizationStatus == UNAuthorizationStatusAuthorized;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
!authority ?: authority(permission);
|
||||
});
|
||||
}];
|
||||
} else {
|
||||
BOOL permission = [[UIApplication sharedApplication] currentUserNotificationSettings].types != UIUserNotificationTypeNone;
|
||||
!authority ?: authority(permission);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - XPMineNotificationTableViewCell
|
||||
- (void)xPMineNotificationTableViewCell:(XPMineNotificationTableViewCell *)cell switchStatus:(BOOL)status {
|
||||
if (!status) {
|
||||
#warning to do 弹框
|
||||
// [TTPopup alertWithMessage:@"您未开启推送通知权限,请前往设置" confirmHandler:^{
|
||||
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
|
||||
// } cancelHandler:^{
|
||||
//
|
||||
// }];
|
||||
self.dataModelArray[0].notification = NO;
|
||||
[self.tableView reloadData];
|
||||
return;
|
||||
}
|
||||
//iOS端只上传给服务器统计,暂无业务操作关系
|
||||
[self.presenter updateUserInfoSystemNotify:status];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineNotificaProtocol
|
||||
- (void)requestUserInfoNotifyStatusSuccess:(NSArray<XPMineNotificationItemModel *> *)array {
|
||||
self.dataModelArray = array;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[_tableView registerClass:[XPMineNotificationTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNotificationTableViewCell class])];
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
@end
|
17
xplan-ios/Main/Mine/View/XPMineSettingViewController.h
Normal file
17
xplan-ios/Main/Mine/View/XPMineSettingViewController.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPMineSettingViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class UserInfoModel;
|
||||
@interface XPMineSettingViewController : MvpViewController
|
||||
///用户信息
|
||||
@property (nonatomic,strong) UserInfoModel *userInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
221
xplan-ios/Main/Mine/View/XPMineSettingViewController.m
Normal file
221
xplan-ios/Main/Mine/View/XPMineSettingViewController.m
Normal file
@@ -0,0 +1,221 @@
|
||||
//
|
||||
// XPMineSettingViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/17.
|
||||
//
|
||||
|
||||
#import "XPMineSettingViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
///Model
|
||||
#import "XPMineSettingItemModel.h"
|
||||
///View
|
||||
#import "XPMineSettingTableViewCell.h"
|
||||
///P
|
||||
#import "XPMineSettingPresent.h"
|
||||
#import "XPMineSettingProtocol.h"
|
||||
///VC
|
||||
#import "XPMineAboutUsViewController.h"
|
||||
#import "XPMineFeedbackViewController.h"
|
||||
#import "XPMineNotificaViewController.h"
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPMineSettingViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineSettingProtocol>
|
||||
///
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray<NSArray<XPMineSettingItemModel *> *> *datasource;
|
||||
///退出登录
|
||||
@property (nonatomic,strong) UIButton *logoutButton;
|
||||
///底部的试图
|
||||
@property (strong, nonatomic) UIView *footerView;
|
||||
@end
|
||||
|
||||
@implementation XPMineSettingViewController
|
||||
|
||||
- (XPMineSettingPresent *)createPresenter {
|
||||
return [[XPMineSettingPresent alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self.presenter getMineSettingDataSourceWith:self.userInfo];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
///每次都需要刷新一个userinfo
|
||||
[self.presenter getUserInfo];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"设置";
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.footerView addSubview:self.logoutButton];
|
||||
self.tableView.tableFooterView = self.footerView;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.logoutButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.footerView).offset(28);
|
||||
make.right.mas_equalTo(self.footerView).offset(-28);
|
||||
make.top.mas_equalTo(self.footerView).offset(40);
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)pushViewControllerWithType:(XPMineSettingItemType)type {
|
||||
switch (type) {
|
||||
case XPMineSettingItemType_Phone:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_Pay_Password:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_Notification_Remind:
|
||||
{
|
||||
XPMineNotificaViewController * notiVC = [[XPMineNotificaViewController alloc] init];
|
||||
[self.navigationController pushViewController:notiVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_Helper:
|
||||
{
|
||||
[self pushWebViewWIthUrl:URLWithType(kFAQURL)];
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_Feedback:
|
||||
{
|
||||
XPMineFeedbackViewController * feedbackVC = [[XPMineFeedbackViewController alloc] init];
|
||||
[self.navigationController pushViewController:feedbackVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_Clear_Memory:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
case XPMineSettingItemType_About_Us:
|
||||
{
|
||||
XPMineAboutUsViewController * aboutusVC = [[XPMineAboutUsViewController alloc] init];
|
||||
[self.navigationController pushViewController:aboutusVC animated:YES];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)pushWebViewWIthUrl:(NSString *)url {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = url;
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 45;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource[section].count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMineSettingTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])];
|
||||
}
|
||||
NSArray * array = [self.datasource objectAtIndex:indexPath.section];
|
||||
XPMineSettingItemModel * model = [array objectAtIndex:indexPath.row];
|
||||
cell.itemModel = model;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
if (section != 0) {
|
||||
return 15;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
UIView * view = [[UIView alloc] init];
|
||||
view.backgroundColor = [UIColor clearColor];
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
XPMineSettingItemModel * model = [[self.datasource objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
|
||||
[self pushViewControllerWithType:model.type];
|
||||
}
|
||||
}
|
||||
#pragma mark - XPMineSettingProtocol
|
||||
- (void)getMineSettingDatasourceSuccess:(NSArray *)array {
|
||||
self.datasource = array;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
[self.presenter getMineSettingDataSourceWith:userInfo];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
[_tableView registerClass:[XPMineSettingTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (UIView *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 168)];
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
- (UIButton *)logoutButton {
|
||||
if (!_logoutButton) {
|
||||
_logoutButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_logoutButton.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_logoutButton.layer.masksToBounds = YES;
|
||||
_logoutButton.layer.cornerRadius = 50/2;
|
||||
_logoutButton.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_logoutButton.frame = CGRectMake(0, 0, KScreenWidth, 50);
|
||||
[_logoutButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
|
||||
[_logoutButton setTitle:@"退出当前账号" forState:UIControlStateNormal];
|
||||
}
|
||||
return _logoutButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -8,8 +8,11 @@
|
||||
#import "XPMineViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <flutter_boost/FlutterBoost.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
///Model
|
||||
#import "XPMineItemModel.h"
|
||||
///P
|
||||
@@ -19,6 +22,9 @@
|
||||
#import "XPMineMenuTableViewCell.h"
|
||||
#import "XPMineMatchTableViewCell.h"
|
||||
#import "XPMineHeadView.h"
|
||||
///VC
|
||||
#import "XPMineSettingViewController.h"
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineMatchTableViewCellDelegate, XPMineHeadViewDelegate>
|
||||
///
|
||||
@@ -57,7 +63,8 @@
|
||||
|
||||
#pragma mark - Response
|
||||
- (void)settingButtonAction:(UIButton *)sender {
|
||||
|
||||
XPMineSettingViewController * settingVC = [[XPMineSettingViewController alloc] init];
|
||||
[self.navigationController pushViewController:settingVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
@@ -85,31 +92,52 @@
|
||||
- (void)pushViewControllerWithType:(XPMineItemType)type {
|
||||
switch (type) {
|
||||
case XPMineItemType_Match_Apply_Record:
|
||||
|
||||
[self pushMatchVCWithKey:@"quotaRecord"];
|
||||
break;
|
||||
case XPMineItemType_Match_Standings:
|
||||
|
||||
[self pushMatchVCWithKey:@"performance"];
|
||||
break;
|
||||
case XPMineItemType_Match_Card_Bag:
|
||||
|
||||
[self pushMatchVCWithKey:@"bag"];
|
||||
break;
|
||||
case XPMineItemType_Match_Shopping:
|
||||
|
||||
[self pushMatchVCWithKey:@"mall"];
|
||||
break;
|
||||
case XPMineItemType_Match_Relevance_Account:
|
||||
|
||||
[self pushWebViewWIthUrl:URLWithType(kGameBindAccountURL)];
|
||||
break;
|
||||
case XPMineItemType_Teenager_Mode:
|
||||
|
||||
#warning to do 青少年
|
||||
break;
|
||||
case XPMineItemType_Real_Name_Authentic:
|
||||
|
||||
[self pushWebViewWIthUrl:URLWithType(kIdentityURL)];
|
||||
break;
|
||||
case XPMineItemType_Account:
|
||||
#warning to do 我的账户
|
||||
break;
|
||||
case XPMineItemType_Invite_Friend:
|
||||
[self pushWebViewWIthUrl:URLWithType(kUserInviteFriendURL)];
|
||||
break;
|
||||
case XPMineItemType_Personinfo:
|
||||
#warning to do 个人中心
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)pushWebViewWIthUrl:(NSString *)url {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = url;
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)pushMatchVCWithKey:(NSString *)key {
|
||||
[[FlutterBoost instance] open:key arguments:@{@"animated":@(YES)} completion:^(BOOL success) {
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
if (section == 0) {
|
||||
@@ -171,7 +199,15 @@
|
||||
#pragma mark - XPMineHeadViewDelegate
|
||||
///点击头像
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAvatar:(UserInfoModel *)info {
|
||||
[self pushViewControllerWithType:XPMineItemType_Personinfo];
|
||||
}
|
||||
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAccount:(UserInfoModel *)info {
|
||||
[self pushViewControllerWithType:XPMineItemType_Account];
|
||||
}
|
||||
|
||||
- (void)xPMineHeadView:(XPMineHeadView *)view didClickInviteFriend:(UserInfoModel *)info {
|
||||
[self pushViewControllerWithType:XPMineItemType_Invite_Friend];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineProtocol
|
||||
@@ -221,6 +257,7 @@
|
||||
[_settingButton setImage:[UIImage imageNamed:@"mine_nav_setting"] forState:UIControlStateNormal];
|
||||
[_settingButton setImage:[UIImage imageNamed:@"mine_nav_setting"] forState:UIControlStateSelected];
|
||||
[_settingButton addTarget:self action:@selector(settingButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_settingButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _settingButton;
|
||||
}
|
||||
|
Reference in New Issue
Block a user