绑定手机号 设置修改支付密码

This commit is contained in:
fengshuo
2021-09-18 20:05:02 +08:00
committed by zu
parent 9fd2250712
commit a8a663a864
71 changed files with 2995 additions and 47 deletions

View File

@@ -82,6 +82,25 @@
E81C27AE26EF39AB0031E639 /* AppDelegate+ThirdConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = E81C27AD26EF39AB0031E639 /* AppDelegate+ThirdConfig.m */; };
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E82109AC26F1C8A000FC3319 /* CountDownHelper.m */; };
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */; };
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */; };
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */; };
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */; };
E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543C26F58C3A00BE8163 /* XPLoginBindSuccessView.m */; };
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543F26F58F9400BE8163 /* XPMinePayPwdViewController.m */; };
E824544326F58FCE00BE8163 /* XPMinePayPwdInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824544226F58FCE00BE8163 /* XPMinePayPwdInputView.m */; };
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824544526F5934600BE8163 /* XPMinePayPwdPresenter.m */; };
E824544826F5945300BE8163 /* XPMinePayPwdProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824544726F5940600BE8163 /* XPMinePayPwdProtocol.h */; };
E824544B26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824544A26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m */; };
E824544E26F5BC1A00BE8163 /* XPMineModifPayPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824544D26F5BC1A00BE8163 /* XPMineModifPayPwdView.m */; };
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */; };
E824545326F5CEAD00BE8163 /* XPMineModifPayProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */; };
E824545626F5E51900BE8163 /* XPMineVerifIdentityViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */; };
E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */; };
E824545C26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824545B26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m */; };
E824545E26F5EF2200BE8163 /* XPMineVerifIdentityProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824545D26F5EEFD00BE8163 /* XPMineVerifIdentityProtocol.h */; };
E824546126F5F4E400BE8163 /* XPMineResetPayPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */; };
E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */; };
E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */; };
E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E872308826E89BE000B90D4F /* LoginPhoneViewController.m */; };
E872308D26E89DAA00B90D4F /* LoginInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872308C26E89DAA00B90D4F /* LoginInputView.m */; };
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872309226E8D31500B90D4F /* LoginVerifCodeView.m */; };
@@ -102,6 +121,7 @@
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 */; };
E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC723C26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.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 */; };
@@ -270,6 +290,39 @@
E82109AC26F1C8A000FC3319 /* CountDownHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountDownHelper.m; sourceTree = "<group>"; };
E82109AE26F1D83500FC3319 /* LoginBindPhonePresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginBindPhonePresent.h; sourceTree = "<group>"; };
E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginBindPhonePresent.m; sourceTree = "<group>"; };
E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = "<group>"; };
E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhoneViewController.m; sourceTree = "<group>"; };
E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhonePresenter.h; sourceTree = "<group>"; };
E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhonePresenter.m; sourceTree = "<group>"; };
E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneProtocol.h; sourceTree = "<group>"; };
E824543B26F58C3A00BE8163 /* XPLoginBindSuccessView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginBindSuccessView.h; sourceTree = "<group>"; };
E824543C26F58C3A00BE8163 /* XPLoginBindSuccessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginBindSuccessView.m; sourceTree = "<group>"; };
E824543E26F58F9400BE8163 /* XPMinePayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdViewController.h; sourceTree = "<group>"; };
E824543F26F58F9400BE8163 /* XPMinePayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdViewController.m; sourceTree = "<group>"; };
E824544126F58FCE00BE8163 /* XPMinePayPwdInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdInputView.h; sourceTree = "<group>"; };
E824544226F58FCE00BE8163 /* XPMinePayPwdInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdInputView.m; sourceTree = "<group>"; };
E824544426F5934600BE8163 /* XPMinePayPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdPresenter.h; sourceTree = "<group>"; };
E824544526F5934600BE8163 /* XPMinePayPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdPresenter.m; sourceTree = "<group>"; };
E824544726F5940600BE8163 /* XPMinePayPwdProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdProtocol.h; sourceTree = "<group>"; };
E824544926F5BBB800BE8163 /* XPMineModifPayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdViewController.h; sourceTree = "<group>"; };
E824544A26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdViewController.m; sourceTree = "<group>"; };
E824544C26F5BC1A00BE8163 /* XPMineModifPayPwdView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdView.h; sourceTree = "<group>"; };
E824544D26F5BC1A00BE8163 /* XPMineModifPayPwdView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdView.m; sourceTree = "<group>"; };
E824544F26F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdPresenter.h; sourceTree = "<group>"; };
E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdPresenter.m; sourceTree = "<group>"; };
E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayProtocol.h; sourceTree = "<group>"; };
E824545426F5E51900BE8163 /* XPMineVerifIdentityViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityViewController.h; sourceTree = "<group>"; };
E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityViewController.m; sourceTree = "<group>"; };
E824545726F5E65900BE8163 /* XPMineVerifIdentityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityView.h; sourceTree = "<group>"; };
E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityView.m; sourceTree = "<group>"; };
E824545A26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityPresenter.h; sourceTree = "<group>"; };
E824545B26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityPresenter.m; sourceTree = "<group>"; };
E824545D26F5EEFD00BE8163 /* XPMineVerifIdentityProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityProtocol.h; sourceTree = "<group>"; };
E824545F26F5F4E400BE8163 /* XPMineResetPayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPwdViewController.h; sourceTree = "<group>"; };
E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetPayPwdViewController.m; sourceTree = "<group>"; };
E824546226F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordPresenter.h; sourceTree = "<group>"; };
E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetPayPasswordPresenter.m; sourceTree = "<group>"; };
E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordProtocol.h; sourceTree = "<group>"; };
E872308726E89BE000B90D4F /* LoginPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPhoneViewController.h; sourceTree = "<group>"; };
E872308826E89BE000B90D4F /* LoginPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginPhoneViewController.m; sourceTree = "<group>"; };
E872308B26E89DAA00B90D4F /* LoginInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginInputView.h; sourceTree = "<group>"; };
@@ -307,6 +360,8 @@
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>"; };
E8AC723B26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginBindPhoneResultViewController.h; sourceTree = "<group>"; };
E8AC723C26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginBindPhoneResultViewController.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>"; };
@@ -545,8 +600,12 @@
189DD56426DE465A00AB55B1 /* LoginViewController.m */,
E81366E126F0A1FC0076364C /* LoginBindPhoneViewController.h */,
E81366E226F0A1FC0076364C /* LoginBindPhoneViewController.m */,
E8AC723B26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.h */,
E8AC723C26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m */,
E81366F126F0B7C80076364C /* LoginFullInfoViewController.h */,
E81366F226F0B7C80076364C /* LoginFullInfoViewController.m */,
E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */,
E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -566,6 +625,8 @@
E81366F526F0C0DF0076364C /* LoginFullInfoPresenter.m */,
E82109AE26F1D83500FC3319 /* LoginBindPhonePresent.h */,
E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */,
E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */,
E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
@@ -578,6 +639,7 @@
E8CEA03E26EA3E0200644B44 /* LoginPasswordProtocol.h */,
E81C279726EB39E10031E639 /* LoginForgetPasswordProtocol.h */,
E81366F726F0C0F60076364C /* LoginFullInfoProtocol.h */,
E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -797,6 +859,8 @@
E872309226E8D31500B90D4F /* LoginVerifCodeView.m */,
E81C278E26EB314D0031E639 /* LoginForgetEditView.h */,
E81C278F26EB314D0031E639 /* LoginForgetEditView.m */,
E824543B26F58C3A00BE8163 /* XPLoginBindSuccessView.h */,
E824543C26F58C3A00BE8163 /* XPLoginBindSuccessView.m */,
);
path = CustomView;
sourceTree = "<group>";
@@ -872,6 +936,14 @@
E8AC722326F47E5E007D6E91 /* XPMineFeedbackViewController.m */,
E8AC722A26F49580007D6E91 /* XPMineNotificaViewController.h */,
E8AC722B26F49580007D6E91 /* XPMineNotificaViewController.m */,
E824543E26F58F9400BE8163 /* XPMinePayPwdViewController.h */,
E824543F26F58F9400BE8163 /* XPMinePayPwdViewController.m */,
E824544926F5BBB800BE8163 /* XPMineModifPayPwdViewController.h */,
E824544A26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m */,
E824545426F5E51900BE8163 /* XPMineVerifIdentityViewController.h */,
E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */,
E824545F26F5F4E400BE8163 /* XPMineResetPayPwdViewController.h */,
E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -887,6 +959,14 @@
E8AC722626F482A4007D6E91 /* XPMineFeedbackPresenter.m */,
E8AC723326F49939007D6E91 /* XPMineNotificaPresenter.h */,
E8AC723426F49939007D6E91 /* XPMineNotificaPresenter.m */,
E824544426F5934600BE8163 /* XPMinePayPwdPresenter.h */,
E824544526F5934600BE8163 /* XPMinePayPwdPresenter.m */,
E824544F26F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.h */,
E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */,
E824545A26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.h */,
E824545B26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m */,
E824546226F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.h */,
E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
@@ -898,6 +978,10 @@
E8AC721D26F4723D007D6E91 /* XPMineSettingProtocol.h */,
E8AC722826F48889007D6E91 /* XPMineFeedbackProtocol.h */,
E8AC723626F49957007D6E91 /* XPMineNotificaProtocol.h */,
E824544726F5940600BE8163 /* XPMinePayPwdProtocol.h */,
E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */,
E824545D26F5EEFD00BE8163 /* XPMineVerifIdentityProtocol.h */,
E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -909,6 +993,12 @@
E8E70D8226F2F51A00F03460 /* XPMineHeadView.m */,
E8E70D8426F2F55C00F03460 /* XPMineAccountView.h */,
E8E70D8526F2F55C00F03460 /* XPMineAccountView.m */,
E824544126F58FCE00BE8163 /* XPMinePayPwdInputView.h */,
E824544226F58FCE00BE8163 /* XPMinePayPwdInputView.m */,
E824544C26F5BC1A00BE8163 /* XPMineModifPayPwdView.h */,
E824544D26F5BC1A00BE8163 /* XPMineModifPayPwdView.m */,
E824545726F5E65900BE8163 /* XPMineVerifIdentityView.h */,
E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */,
);
path = SubViews;
sourceTree = "<group>";
@@ -1061,19 +1151,30 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */,
E824545E26F5EF2200BE8163 /* XPMineVerifIdentityProtocol.h in Sources */,
E824545326F5CEAD00BE8163 /* XPMineModifPayProtocol.h in Sources */,
E824544826F5945300BE8163 /* XPMinePayPwdProtocol.h in Sources */,
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */,
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */,
E824545C26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m in Sources */,
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 */,
E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */,
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
E824544E26F5BC1A00BE8163 /* XPMineModifPayPwdView.m in Sources */,
E8B825CA26EA1231009E8E9F /* LoginVerifCodeViewController.m in Sources */,
189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */,
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */,
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */,
189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */,
E8E70D8926F2F58F00F03460 /* XPMineMatchTableViewCell.m in Sources */,
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */,
@@ -1102,19 +1203,24 @@
189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */,
189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */,
18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */,
E824544326F58FCE00BE8163 /* XPMinePayPwdInputView.m in Sources */,
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
E8E70D8626F2F55C00F03460 /* XPMineAccountView.m in Sources */,
E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */,
E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */,
E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */,
18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */,
E824546126F5F4E400BE8163 /* XPMineResetPayPwdViewController.m in Sources */,
E8B825C226EA00DF009E8E9F /* LoginVerifCodePresent.m in Sources */,
18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */,
E81366F626F0C0DF0076364C /* LoginFullInfoPresenter.m in Sources */,
189DD67E26E1FD8900AB55B1 /* UIImage+Utils.m in Sources */,
E824545626F5E51900BE8163 /* XPMineVerifIdentityViewController.m in Sources */,
18E7B31E26F0984C0064BC9B /* UserLevelVo.m in Sources */,
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */,
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */,
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
E8AC720D26F435F5007D6E91 /* UIImageView+LoadImage.m in Sources */,
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */,
@@ -1126,6 +1232,8 @@
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
E81366E726F0A49E0076364C /* NSString+Regex.m in Sources */,
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
E824544B26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m in Sources */,
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */,
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */,
@@ -1137,6 +1245,8 @@
189DD73D26E21C3F00AB55B1 /* YYUtility+Device.m in Sources */,
187EEEDC26E89B32002833B2 /* BaseModel.m in Sources */,
E81366FC26F0D2980076364C /* UIButton+EnlargeTouchArea.m in Sources */,
E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */,
E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */,
189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */,
189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */,
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_bind_phone_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_setting_modif_pay_pwd_hidden@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_setting_modif_pay_pwd_hidden@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_setting_modif_pay_pwd_show@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_setting_modif_pay_pwd_show@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_setting_pay_password_hidden@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_setting_pay_password_hidden@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_setting_pay_password_show@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_setting_pay_password_show@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -22,6 +22,23 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)getUserInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
/// 获取手机号的验证码
/// @param completion 请求完成
/// @param mobile 手机号
/// @param type 类型 请看XPEunm中的枚举
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type;
/// 校验手机号码
/// @param complection 完成
/// @param mobile 手机号
/// @param code 验证码
/// @param uid 用户的uid
/// @param ticket ticket
+ (void)checkMoblieCodeWithComplection:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket;
@end
NS_ASSUME_NONNULL_END

View File

@@ -40,4 +40,26 @@
[self makeRequest:@"user/get" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
}
///
/// @param completion
/// @param mobile
/// @param type XPEunm
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type {
[self makeRequest:@"sms/getCode" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, nil];
}
///
/// @param complection
/// @param mobile
/// @param code
/// @param uid uid
/// @param ticket ticket
+ (void)checkMoblieCodeWithComplection:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket {
[self makeRequest:@"sms/verify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, mobile, code, uid, ticket,nil];
}
@end

View File

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
UIKIT_EXTERN NSString * const kUMengAppkey;
UIKIT_EXTERN NSString * const kChannelKey;
UIKIT_EXTERN NSString * const kWeChatNumber;
typedef NS_ENUM(NSUInteger, KeyType) {
KeyType_PasswordEncode,///密码 des 加密的

View File

@@ -11,7 +11,7 @@
NSString * const kUMengAppKey = @"5ff6bc6dadb42d5826a1cbc4";
NSString * const kChannelKey = @"App Store";
NSString * const kWeChatNumber = @"yinyoucc";
///
NSString * const KeyWithType(KeyType type) {

View File

@@ -14,4 +14,16 @@ typedef NS_ENUM(NSUInteger, ThirdLoginType) {
ThirdLoginType_Apple = 5,///苹果登录
};
/// @param type 类型 业务类型必填1注册2登录3重设密码4绑定手机5绑定xczAccount6重设xcz密码7解绑手机
typedef NS_ENUM(NSUInteger, GetSmsType) {
GetSmsType_Regist = 1,///注册
GetSmsType_Login = 2,///登录
GetSmsType_Reset_Password = 3,///重设密码
GetSmsType_Bind_Phone = 4, ///绑定手机
GetSmsType_Bind_ZF = 5,///绑定支付宝
GetSmsType_Reset_ZF = 6,///重设支付密码
GetSmsType_Unbind_Phone = 7, ///解绑手机
};
#endif /* XPEnum_h */

View File

@@ -10,32 +10,42 @@ NS_ASSUME_NONNULL_BEGIN
@interface Api (Login)
+ (void)phoneQuickLogin:(HttpRequestHelperCompletion)completion accessToken:(NSString *)accessToken token:(NSString *)token;
/// 获取手机号的验证码
/// @param completion 请求完成
/// @param mobile 手机号
/// @param type 类型 业务类型必填1注册2登录3重设密码4绑定手机5绑定xczAccount6重设xcz密码7解绑手机
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type;
+ (void)phoneQuickLogin:(HttpRequestHelperCompletion)completion
accessToken:(NSString *)accessToken
token:(NSString *)token;
/// 手机验证码登录
/// @param completion 完成
/// @param phone 手机号
/// @param code 验证码
+ (void)loginWithCode:(HttpRequestHelperCompletion)completion phone:(NSString *)phone code:(NSString *)code client_secret:(NSString *)client_secret version:(NSString *)version client_id:(NSString *)client_id grant_type:(NSString *)grant_type;
+ (void)loginWithCode:(HttpRequestHelperCompletion)completion
phone:(NSString *)phone
code:(NSString *)code
client_secret:(NSString *)client_secret
version:(NSString *)version
client_id:(NSString *)client_id
grant_type:(NSString *)grant_type;
/// 手机密码登录
/// @param completion 完成
/// @param phone 手机号
/// @param password 验证码
+ (void)loginWithPassword:(HttpRequestHelperCompletion)completion phone:(NSString *)phone password:(NSString *)password client_secret:(NSString *)client_secret version:(NSString *)version client_id:(NSString *)client_id grant_type:(NSString *)grant_type;
+ (void)loginWithPassword:(HttpRequestHelperCompletion)completion
phone:(NSString *)phone
password:(NSString *)password
client_secret:(NSString *)client_secret
version:(NSString *)version
client_id:(NSString *)client_id
grant_type:(NSString *)grant_type;
/// 充值密码 没有登录的时候
/// @param complction 完成
/// @param phone 手机号
/// @param newPwd 新的密码
/// @param smsCode 验证码
+ (void)resetPasswordWithPhone:(HttpRequestHelperCompletion)complction phone:(NSString *)phone newPwd:(NSString *)newPwd smsCode:(NSString *)smsCode;
+ (void)resetPasswordWithPhone:(HttpRequestHelperCompletion)complction
phone:(NSString *)phone
newPwd:(NSString *)newPwd
smsCode:(NSString *)smsCode;
/// 第三方登录
/// @param complction 完成
@@ -43,7 +53,11 @@ NS_ASSUME_NONNULL_BEGIN
/// @param unionid unionid
/// @param access_token access_token
/// @param type 第三方登录的类型
+ (void)loginWithThirdPart:(HttpRequestHelperCompletion)complction openid:(NSString *)openid unionid:(NSString *)unionid access_token:(NSString *)access_token type:(NSString *)type;
+ (void)loginWithThirdPart:(HttpRequestHelperCompletion)complction
openid:(NSString *)openid
unionid:(NSString *)unionid
access_token:(NSString *)access_token
type:(NSString *)type;
/// 绑定手机
/// @param completion 完成
@@ -51,7 +65,11 @@ NS_ASSUME_NONNULL_BEGIN
/// @param code 验证码
/// /// @param uid uid
/// @param ticket ticket
+ (void)bindPhoneWitPhone:(HttpRequestHelperCompletion)completion phone:(NSString *)phone code:(NSString *)code uid:(NSString *)uid ticket:(NSString *)ticket;
+ (void)bindPhoneWitPhone:(HttpRequestHelperCompletion)completion
phone:(NSString *)phone
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket;
/// 随机获取一个昵称
/// @param completion 完成
@@ -78,6 +96,17 @@ NS_ASSUME_NONNULL_BEGIN
roomUid:(NSString *)roomUid
shareUid:(NSString *)shareUid
shareChannel:(NSString *)shareChannel;
/// 绑定手机号码
/// @param complection 完成
/// @param mobile 手机号
/// @param code 验证码
/// @param uid 用户的uid
/// @param ticket ticket
+ (void)bindMoblieCodeWithComplection:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket;
@end
NS_ASSUME_NONNULL_END

View File

@@ -13,15 +13,6 @@
[self makeRequest:@"acc/oneclick/login" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, token, nil];
}
///
/// @param completion
/// @param mobile
/// @param type 12345xczAccount6xcz7
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type {
[self makeRequest:@"sms/getCode" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, nil];
}
///
/// @param completion
/// @param phone
@@ -97,8 +88,22 @@
roomUid:(NSString *)roomUid
shareUid:(NSString *)shareUid
shareChannel:(NSString *)shareChannel {
[self makeRequest:@"random/nick/get" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,avatar,gender,nick, inviteCode, uid, ticket, roomUid, shareUid, shareChannel,nil];
[self makeRequest:@"user/v2/update" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,avatar,gender,nick, inviteCode, uid, ticket, roomUid, shareUid, shareChannel,nil];
}
///
/// @param complection
/// @param mobile
/// @param code
/// @param uid uid
/// @param ticket ticket
+ (void)bindMoblieCodeWithComplection:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket {
[self makeRequest:@"withDraw/phone" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, mobile, code, uid, ticket, nil];
}
@end

View File

@@ -6,14 +6,14 @@
//
#import "BaseMvpPresenter.h"
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface LoginForgetPasswordPresent : BaseMvpPresenter
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)phoneSmsCode:(NSString *)phone type:(int)type;
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
/// 没有登录的时候 重置密码
/// @param phone 手机号

View File

@@ -26,7 +26,7 @@
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(int)type {
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
[Api phoneSmsCode:[self createHttpCompletion:^(id _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {

View File

@@ -6,14 +6,14 @@
//
#import "BaseMvpPresenter.h"
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface LoginVerifCodePresent : BaseMvpPresenter
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)phoneSmsCode:(NSString *)phone type:(int)type;
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
/// 使用手机号和验证码登录
/// @param phone 手机号

View File

@@ -28,7 +28,7 @@
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(int)type {
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
[Api phoneSmsCode:[self createHttpCompletion:^(id _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {

View File

@@ -0,0 +1,30 @@
//
// XPLoginVerifBindPhonePresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MainPresenter.h"
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPLoginVerifBindPhonePresenter : MainPresenter
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
/// 校验手机验证码接口
/// @param moblieNum 手机号码
/// @param code 验证码
- (void)checkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code;
/// 绑定手机验证码接口
/// @param moblieNum 手机号码
/// @param code 验证码
- (void)bindkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,55 @@
//
// XPLoginVerifBindPhonePresenter.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPLoginVerifBindPhonePresenter.h"
#import "Api+Login.h"
///Tool
#import "AccountInfoStorage.h"
///P
#import "XPLoginVerifBindPhoneProtocol.h"
@implementation XPLoginVerifBindPhonePresenter
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
[Api phoneSmsCode:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:phone type:typeStr];
}
///
/// @param moblieNum
/// @param code
- (void)checkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code {
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
[Api checkMoblieCodeWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] checkMoblieCodeWithMoblieSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:moblieNum code:code uid:uid ticket:ticket];
}
///
/// @param moblieNum
/// @param code
- (void)bindkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code {
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
[Api bindMoblieCodeWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] bindMoblieCodeWithMoblieSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:moblieNum code:code uid:uid ticket:ticket];
}
@end

View File

@@ -0,0 +1,21 @@
//
// XPLoginVerifBindPhoneProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPLoginVerifBindPhoneProtocol <NSObject>
///请求手机号的验证码成功
- (void)phoneSmsCodeSuccess;
///绑定手机号成功
- (void)bindMoblieCodeWithMoblieSuccess;
///验证绑定手机成功
- (void)checkMoblieCodeWithMoblieSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,17 @@
//
// XPLoginBindSuccessView.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^XPBindViewDismissHandler)(void);
@interface XPLoginBindSuccessView : UIView
@property (nonatomic, copy) XPBindViewDismissHandler dismissHandler;
+ (void)showBindSuccessViewWithHandler:(XPBindViewDismissHandler)handler;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,128 @@
//
// XPLoginBindSuccessView.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPLoginBindSuccessView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
@interface XPLoginBindSuccessView ()
@property (nonatomic, strong) UIImageView *successImageView;
@property (nonatomic, strong) UILabel *textLabel;
@property (nonatomic, strong) UIButton *closeBtn;
@end
@implementation XPLoginBindSuccessView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self baseUI];
[self initViews];
[self initConstraints];
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
}
#pragma mark -
#pragma mark lifeCycle
- (void)baseUI {
self.layer.cornerRadius = 8.f;
self.layer.masksToBounds = YES;
self.backgroundColor = [UIColor whiteColor];
}
- (void)initViews {
[self addSubview:self.successImageView];
[self addSubview:self.textLabel];
[self addSubview:self.closeBtn];
}
- (void)initConstraints {
[self.successImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(18);
make.centerX.mas_equalTo(0);
make.size.mas_equalTo(CGSizeMake(76, 76));
}];
[self.textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(self.successImageView.mas_bottom).offset(7);
}];
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(self.textLabel.mas_bottom).offset(22);
make.height.mas_equalTo(38);
make.width.mas_equalTo(124);
}];
}
#pragma mark -
#pragma mark private methods
+ (void)showBindSuccessViewWithHandler:(XPBindViewDismissHandler)handler {
XPLoginBindSuccessView *bindSuccessView = [[XPLoginBindSuccessView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 64, 195)];
bindSuccessView.dismissHandler = handler;
#warning to do
// [TTPopup popupView:bindSuccessView style:TTPopupStyleAlert];
}
#pragma mark -
#pragma mark button click events
- (void)closeBtnClickAction:(UIButton *)btn {
#warning to do
// [TTPopup dismiss];
!_dismissHandler ? : _dismissHandler();
}
#pragma mark -
#pragma mark getter & setter
- (UIImageView *)successImageView
{
if (!_successImageView) {
_successImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Binding_successIcon"]];
}
return _successImageView;
}
- (UILabel *)textLabel
{
if (!_textLabel) {
_textLabel = [[UILabel alloc] init];
_textLabel.text = @"恭喜您!绑定成功";
_textLabel.textColor = [ThemeColor mainTextColor];
_textLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:17];
_textLabel.adjustsFontSizeToFitWidth = YES;
_textLabel.textAlignment = NSTextAlignmentCenter;
}
return _textLabel;
}
- (UIButton *)closeBtn {
if (!_closeBtn) {
_closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_closeBtn setTitle:@"关闭" forState:UIControlStateNormal];
[_closeBtn setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
[_closeBtn setBackgroundColor:[ThemeColor appBackgroundColor]];
[_closeBtn.titleLabel setFont:[UIFont systemFontOfSize:15.f]];
_closeBtn.layer.masksToBounds = YES;
_closeBtn.layer.cornerRadius = 19;
[_closeBtn addTarget:self action:@selector(closeBtnClickAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _closeBtn;
}
@end

View File

@@ -12,6 +12,7 @@
///Tool
#import "ThemeColor.h"
#import "CountDownHelper.h"
#import "XPEnum.h"
#import "UIImage+Utils.h"
///Presenter
#import "LoginForgetPasswordPresent.h"
@@ -104,7 +105,7 @@
if (self.phoneView.textField.text.length != 11) {
[self showErrorToast:@"请输入正确的手机号码"];
} else {
[self.presenter phoneSmsCode:self.phoneView.textField.text type:3];
[self.presenter phoneSmsCode:self.phoneView.textField.text type:GetSmsType_Reset_Password];
}
}];

View File

@@ -92,7 +92,7 @@
- (void)httpRequestPhoneSmsCode {
[self.presenter phoneSmsCode:self.phone type:1];
[self.presenter phoneSmsCode:self.phone type:GetSmsType_Regist];
}
- (void)initEvents {

View File

@@ -0,0 +1,16 @@
//
// XPLoginBindPhoneResultViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/17.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class UserInfoModel;
@interface XPLoginBindPhoneResultViewController : BaseViewController
@property (nonatomic, strong) UserInfoModel *userInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,151 @@
//
// XPLoginBindPhoneResultViewController.m
// xplan-ios
//
// Created by on 2021/9/17.
//
#import "XPLoginBindPhoneResultViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "UIImage+Utils.h"
///Model
#import "UserInfoModel.h"
///VC
#import "XPLoginVerifBindPhoneViewController.h"
@interface XPLoginBindPhoneResultViewController ()
@property (nonatomic, strong) UIView *containerView;
@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *phoneLabel;
@property (nonatomic, strong) UIButton *changePhoneBtn;
@end
@implementation XPLoginBindPhoneResultViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initViews];
[self setUpConstraints];
[self setEvents];
[self setConfigs];
}
#pragma mark lifeCycle
- (void)initViews {
[self.view addSubview:self.containerView];
[self.containerView addSubview:self.iconImageView];
[self.containerView addSubview:self.titleLabel];
[self.containerView addSubview:self.phoneLabel];
[self.containerView addSubview:self.changePhoneBtn];
}
#pragma mark
- (void)setConfigs {
self.title = @"绑定手机";
self.phoneLabel.text = self.userInfo.phone;
}
#pragma mark
- (void)setEvents {
@weakify(self)
[[self.changePhoneBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self)
//
XPLoginVerifBindPhoneViewController *vc = [[XPLoginVerifBindPhoneViewController alloc] init];
vc.userInfo = self.userInfo;
vc.bindingPhoneNumType = XPBindingPhoneNumTypeConfirm;
[self.navigationController pushViewController:vc animated:YES];
}];
}
#pragma mark
- (void)setUpConstraints {
[self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(49);
make.left.right.bottom.mas_equalTo(0);
}];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(50);
make.centerX.mas_equalTo(0);
make.size.mas_equalTo(CGSizeMake(135, 130));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(self.iconImageView.mas_bottom).offset(39);
}];
[self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(0);
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(11);
}];
[self.changePhoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(41);
make.left.right.mas_equalTo(0).inset(32);
make.centerX.mas_equalTo(0);
make.height.mas_equalTo(45);
}];
}
- (UIView *)containerView{
if (!_containerView) {
_containerView = [[UIView alloc] init];
_containerView.backgroundColor = [ThemeColor appBackgroundColor];
}
return _containerView;
}
- (UIImageView *)iconImageView{
if (!_iconImageView) {
_iconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"login_bind_phone_bg"]];
}
return _iconImageView;
}
- (UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"您当前绑定的手机号为";
_titleLabel.textColor = [ThemeColor secondTextColor];
_titleLabel.font = [UIFont systemFontOfSize:14.f];
_titleLabel.adjustsFontSizeToFitWidth = YES;
_titleLabel.textAlignment = NSTextAlignmentCenter;
}
return _titleLabel;
}
- (UILabel *)phoneLabel{
if (!_phoneLabel) {
_phoneLabel = [[UILabel alloc] init];
_phoneLabel.textColor = [ThemeColor mainTextColor];
_phoneLabel.font = [UIFont boldSystemFontOfSize:18.f];
_phoneLabel.adjustsFontSizeToFitWidth = YES;
_phoneLabel.textAlignment = NSTextAlignmentCenter;
}
return _phoneLabel;
}
- (UIButton *)changePhoneBtn {
if (!_changePhoneBtn) {
_changePhoneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_changePhoneBtn setTitle:@"更改手机号码" forState:UIControlStateNormal];
[_changePhoneBtn setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_changePhoneBtn.titleLabel setFont:[UIFont systemFontOfSize:18.f]];
[_changePhoneBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
_changePhoneBtn.layer.masksToBounds = YES;
_changePhoneBtn.layer.cornerRadius = 22.5;
}
return _changePhoneBtn;
}
@end

View File

@@ -0,0 +1,29 @@
//
// XPLoginVerifBindPhoneViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
/**
手机号绑定的类型
- TTBindingPhoneNumTypeNormal: 普通状态,首次绑定
- TTBindingPhoneNumTypeConfirm : 验证状态:验证已绑定的手机
*/
typedef NS_ENUM(NSUInteger, TTBindingPhoneNumType) {
XPBindingPhoneNumTypeNormal = 0,
XPBindingPhoneNumTypeEdit = 1,
XPBindingPhoneNumTypeConfirm = 2,
};
@class UserInfoModel;
@interface XPLoginVerifBindPhoneViewController : MvpViewController
@property (nonatomic, assign) TTBindingPhoneNumType bindingPhoneNumType;
///用户信息
@property (nonatomic, strong) UserInfoModel *userInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,429 @@
//
// XPLoginVerifBindPhoneViewController.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPLoginVerifBindPhoneViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "XPConstant.h"
#import "XPMacro.h"
#import "UIImage+Utils.h"
#import "CountDownHelper.h"
///Model
#import "UserInfoModel.h"
///P
#import "XPLoginVerifBindPhoneProtocol.h"
#import "XPLoginVerifBindPhonePresenter.h"
///VC
#import "LoginBindPhoneViewController.h"
#import "XPMineSettingViewController.h"
///View
#import "XPLoginBindSuccessView.h"
@interface XPLoginVerifBindPhoneViewController ()<XPLoginVerifBindPhoneProtocol, CountDownHelperDelegate>
@property (nonatomic, strong) UIView *containerView;
@property (nonatomic, strong) UILabel *areaLabel;
@property (nonatomic, strong) UIButton *countryBtn;
@property (nonatomic, strong) UIView *areaLineView;
@property (nonatomic, strong) UIView *phoneLineView;
@property (nonatomic, strong) UIView *authLineView;
@property (nonatomic, strong) UILabel *areaCodeLabel;
@property (nonatomic, strong) UIButton *authCodeBtn;
@property (nonatomic, strong) UITextField *phoneNumTextField;
@property (nonatomic, strong) UITextField *authCodeTextField;
@property (nonatomic, strong) UIButton *confirmBtn; //
@property (nonatomic, strong) UILabel *tipsLabel; //
@property (nonatomic, assign) BOOL isResetPhone; //
@end
@implementation XPLoginVerifBindPhoneViewController
- (XPLoginVerifBindPhonePresenter *)createPresenter {
return [[XPLoginVerifBindPhonePresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
[self setConfigs];
[self setEvents];
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[[CountDownHelper shareHelper] stopCountDown];
}
#pragma mark - Private Method
- (void)initSubViews {
[CountDownHelper shareHelper].delegate = self;
[self.view addSubview:self.containerView];
[self.containerView addSubview:self.areaLabel];
[self.containerView addSubview:self.countryBtn];
[self.containerView addSubview:self.areaLineView];
[self.containerView addSubview:self.areaCodeLabel];
[self.containerView addSubview:self.phoneNumTextField];
[self.containerView addSubview:self.phoneLineView];
[self.containerView addSubview:self.authCodeBtn];
[self.containerView addSubview:self.authCodeTextField];
[self.containerView addSubview:self.authLineView];
[self.containerView addSubview:self.confirmBtn];
[self.containerView addSubview:self.tipsLabel];
}
- (void)initSubViewConstraints {
[self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(0);
make.left.right.bottom.mas_equalTo(0);
}];
[self.areaLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(32);
make.top.mas_equalTo(20);
}];
[self.countryBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-32);
make.centerY.mas_equalTo(self.areaLabel);
}];
[self.areaLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.areaLabel.mas_bottom).offset(18);
make.left.right.mas_equalTo(0).inset(32);
make.height.mas_equalTo(1);
}];
[self.areaCodeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.areaLineView.mas_bottom).offset(18);
make.left.mas_equalTo(self.areaLabel);
}];
[self.phoneNumTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(80);
make.centerY.mas_equalTo(self.areaCodeLabel);
make.right.mas_equalTo(self.authCodeBtn.mas_left).offset(-20);
}];
[self.authCodeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-32);
make.centerY.mas_equalTo(self.areaCodeLabel);
}];
[self.phoneLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.height.mas_equalTo(self.areaLineView);
make.top.mas_equalTo(self.areaCodeLabel.mas_bottom).offset(18);
}];
[self.authCodeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(0).inset(32);
make.height.mas_equalTo(48);
make.top.mas_equalTo(self.phoneLineView.mas_bottom);
}];
[self.authLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.left.right.mas_equalTo(self.areaLineView);
make.top.mas_equalTo(self.authCodeTextField.mas_bottom);
}];
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(0).inset(32);
make.top.mas_equalTo(self.authLineView.mas_bottom).offset(70);
make.height.mas_equalTo(45);
}];
[self.tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.confirmBtn.mas_bottom).offset(36);
make.centerX.mas_equalTo(0);
}];
}
#pragma mark -
- (void)setConfigs {
switch (self.bindingPhoneNumType) {
case XPBindingPhoneNumTypeEdit:{
self.navigationItem.title = @"更改绑定手机";
}
break;
case XPBindingPhoneNumTypeNormal:{
self.navigationItem.title = @"绑定手机号";
}
break;
case XPBindingPhoneNumTypeConfirm:{
self.tipsLabel.hidden = NO;
self.navigationItem.title = @"验证已绑定的手机号码";
[self.confirmBtn setTitle:@"验证" forState:UIControlStateNormal];
if (self.userInfo.isBindPhone) {
self.phoneNumTextField.enabled = NO;
self.phoneNumTextField.text = self.userInfo.phone;
}
}
break;
default:
break;
}
RAC(self.confirmBtn,enabled) = [RACSignal combineLatest:@[self.phoneNumTextField.rac_textSignal,self.authCodeTextField.rac_textSignal] reduce:^(NSString *phone,NSString *code){
return @(phone.length == 11 && code.length == 5);
}];
}
#pragma mark
- (void)setEvents {
@weakify(self)
//
[[[self.authCodeBtn rac_signalForControlEvents:UIControlEventTouchUpInside] filter:^BOOL(__kindof UIControl * _Nullable value) {
//
if (self.phoneNumTextField.text.length == 0) {
[self showErrorToast:@"手机号码不能为空"];
return NO;
}else if (self.phoneNumTextField.text.length < 11) {
[self showErrorToast:@"请输入正确手机号码"];
return NO;
}else {
return YES;
}
}] subscribeNext:^(id _Nullable x) {
@strongify(self);
[self.presenter phoneSmsCode:self.phoneNumTextField.text type:self.bindingPhoneNumType == XPBindingPhoneNumTypeConfirm ? GetSmsType_Unbind_Phone : GetSmsType_Bind_Phone];
}];
//
[[[self.confirmBtn rac_signalForControlEvents:UIControlEventTouchUpInside] filter:^BOOL(__kindof UIControl * _Nullable value) {
@strongify(self)
//
if (self.phoneNumTextField.text.length == 0) {
[self showErrorToast:@"手机号码不能为空"];
return NO;
}else if (self.authCodeTextField.text.length == 0) {
[self showErrorToast:@"验证码不能为空"];
return NO;
}else {
return YES;
}
}] subscribeNext:^(id _Nullable x) {
@strongify(self)
if (self.bindingPhoneNumType == XPBindingPhoneNumTypeConfirm) {
[self.presenter checkMoblieCodeWithMoblie:self.phoneNumTextField.text code:self.authCodeTextField.text];
} else {
[self.presenter bindkMoblieCodeWithMoblie:self.phoneNumTextField.text code:self.authCodeTextField.text];
}
} error:^(NSError * _Nullable error) {
}];
}
#pragma mark - XPLoginVerifBindPhoneProtocol
- (void)phoneSmsCodeSuccess {
self.authCodeBtn.enabled = NO;
[self showSuccessToast:@"验证码发送成功"];
[[CountDownHelper shareHelper] openCountdownWithTime:60];
}
- (void)checkMoblieCodeWithMoblieSuccess {
[self showSuccessToast:@"验证成功"];
[[CountDownHelper shareHelper] stopCountDown];
XPLoginVerifBindPhoneViewController *vc = [[XPLoginVerifBindPhoneViewController alloc] init];
vc.bindingPhoneNumType = XPBindingPhoneNumTypeEdit;
vc.userInfo = self.userInfo;
[self.navigationController pushViewController:vc animated:YES];
}
- (void)bindMoblieCodeWithMoblieSuccess {
[[CountDownHelper shareHelper] stopCountDown];
//
if (self.bindingPhoneNumType == XPBindingPhoneNumTypeEdit) {
@weakify(self);
[XPLoginBindSuccessView showBindSuccessViewWithHandler:^{
@strongify(self);
//
__block __kindof UIViewController *vc;
[self.navigationController.childViewControllers enumerateObjectsUsingBlock:^(__kindof UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[XPMineSettingViewController class]]) {
vc = obj; // VC
}
}];
if ([self.navigationController.childViewControllers containsObject:vc]) {
[self.navigationController popToViewController:vc animated:YES];
} else {
[self.navigationController popViewControllerAnimated:YES];
}
}];
} else if (self.bindingPhoneNumType == XPBindingPhoneNumTypeNormal) {
@weakify(self);
[XPLoginBindSuccessView showBindSuccessViewWithHandler:^{
@strongify(self);
[self.navigationController popViewControllerAnimated:YES];
}];
}
self.confirmBtn.enabled = YES; //
}
#pragma mark - CountDownHelperDelegate
///
- (void)onCountdownOpen:(int)time {
[self.authCodeBtn setTitle:[NSString stringWithFormat:@"%ds后重试", time] forState:UIControlStateDisabled];
}
///
- (void)onCountdownFinish {
self.authCodeBtn.enabled= YES;
[self.authCodeBtn setTitle:@"重新发送" forState:UIControlStateNormal];
}
#pragma mark - Getters And Setters
- (UIView *)containerView{
if (!_containerView) {
_containerView = [[UIView alloc] init];
_containerView.backgroundColor = [ThemeColor appBackgroundColor];
}
return _containerView;
}
- (UILabel *)areaLabel{
if (!_areaLabel) {
_areaLabel = [[UILabel alloc] init];
_areaLabel.text = @"国家和地区";
_areaLabel.textColor = [ThemeColor secondTextColor];
_areaLabel.font = [UIFont systemFontOfSize:14.f];
_areaLabel.adjustsFontSizeToFitWidth = YES;
}
return _areaLabel;
}
- (UILabel *)areaCodeLabel{
if (!_areaCodeLabel) {
_areaCodeLabel = [[UILabel alloc] init];
_areaCodeLabel.text = @"+86";
_areaCodeLabel.textColor = [ThemeColor secondTextColor];
_areaCodeLabel.font = [UIFont systemFontOfSize:14.f];
_areaCodeLabel.adjustsFontSizeToFitWidth = YES;
}
return _areaCodeLabel;
}
- (UIButton *)countryBtn {
if (!_countryBtn) {
_countryBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_countryBtn setTitle:@"中国" forState:UIControlStateNormal];
[_countryBtn setImage:[UIImage imageNamed:@"mine_item_arrow"] forState:UIControlStateNormal];
_countryBtn.transform = CGAffineTransformMakeScale(-1.0, 1.0);
_countryBtn.titleLabel.transform = CGAffineTransformMakeScale(-1.0, 1.0);
_countryBtn.imageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
_countryBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 0);
[_countryBtn setTitleColor:[ThemeColor secondTextColor] forState:UIControlStateNormal];
[_countryBtn.titleLabel setFont:[UIFont systemFontOfSize:14.f]];
}
return _countryBtn;
}
- (UIButton *)confirmBtn {
if (!_confirmBtn) {
_confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_confirmBtn setTitle:@"绑定" forState:UIControlStateNormal];
[_confirmBtn setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_confirmBtn setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
[_confirmBtn.titleLabel setFont:[UIFont systemFontOfSize:18.f]];
_confirmBtn.layer.cornerRadius = 22.5f;
_confirmBtn.layer.masksToBounds = YES;
_confirmBtn.enabled = NO;
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor disableButtonColor], [ThemeColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled];
}
return _confirmBtn;
}
- (UIButton *)authCodeBtn {
if (!_authCodeBtn) {
_authCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_authCodeBtn setTitle:@"获取验证码" forState:UIControlStateNormal];
[_authCodeBtn setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
[_authCodeBtn setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
[_authCodeBtn.titleLabel setFont:[UIFont systemFontOfSize:12.f]];
}
return _authCodeBtn;
}
- (UITextField *)phoneNumTextField {
if (!_phoneNumTextField) {
_phoneNumTextField = [[UITextField alloc] init];
_phoneNumTextField.textColor = [ThemeColor mainTextColor];
_phoneNumTextField.font = [UIFont systemFontOfSize:14.f];
_phoneNumTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"输入手机号"attributes:@{NSForegroundColorAttributeName: [ThemeColor secondTextColor]}];
_phoneNumTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
_phoneNumTextField.borderStyle = UITextBorderStyleNone;
_phoneNumTextField.keyboardType = UIKeyboardTypeNumberPad;
_phoneNumTextField.tintColor = [ThemeColor mainTextColor];
}
return _phoneNumTextField;
}
- (UITextField *)authCodeTextField {
if (!_authCodeTextField) {
_authCodeTextField = [[UITextField alloc] init];
_authCodeTextField.textColor = [ThemeColor mainTextColor];
_authCodeTextField.font = [UIFont systemFontOfSize:14.f];
_authCodeTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"输入验证码"attributes:@{NSForegroundColorAttributeName: [ThemeColor secondTextColor]}];
_authCodeTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
_authCodeTextField.borderStyle = UITextBorderStyleNone;
_authCodeTextField.keyboardType = UIKeyboardTypeNumberPad;
_authCodeTextField.tintColor = [ThemeColor mainTextColor];
}
return _authCodeTextField;
}
- (UIView *)areaLineView {
if (!_areaLineView) {
_areaLineView = [[UIView alloc] init];
_areaLineView.backgroundColor = [ThemeColor dividerColor];
}
return _areaLineView;
}
- (UIView *)phoneLineView {
if (!_phoneLineView) {
_phoneLineView = [[UIView alloc] init];
_phoneLineView.backgroundColor = [ThemeColor dividerColor];
}
return _phoneLineView;
}
- (UIView *)authLineView {
if (!_authLineView) {
_authLineView = [[UIView alloc] init];
_authLineView.backgroundColor = [ThemeColor dividerColor];
}
return _authLineView;
}
- (UILabel *)tipsLabel{
if (!_tipsLabel) {
_tipsLabel = [[UILabel alloc] init];
_tipsLabel.text = [NSString stringWithFormat:@"如果您的手机号已丢失\n请联系客服微信%@", kWeChatNumber];
_tipsLabel.textColor = [ThemeColor textThirdColor];
_tipsLabel.font = [UIFont systemFontOfSize:14.f];
_tipsLabel.adjustsFontSizeToFitWidth = YES;
_tipsLabel.numberOfLines = 0;
_tipsLabel.hidden = YES;
}
return _tipsLabel;
}
@end

View File

@@ -35,6 +35,32 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)complection
sysMsgNotify:(NSString *)sysMsgNotify
uid:(NSString *)uid;
/// 设置支付密码
/// @param complection 完成
/// @param newPasswd 支付密码
/// @param phone 手机号
/// @param code 验证码
/// @param uid uid
/// @param ticket ticket
+ (void)setPayPasswordWithComplection:(HttpRequestHelperCompletion)complection
newPasswd:(NSString *)newPasswd
phone:(NSString *)phone
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket;
/// 修改支付密码
/// @param complection 完成
/// @param newPasswd 新的支付密码
/// @param oldPasswd 旧的支付密码
/// @param uid uid
/// @param ticket ticket
+ (void)modifPayPasswordWithComplection:(HttpRequestHelperCompletion)complection
newPasswd:(NSString *)newPasswd
oldPasswd:(NSString *)oldPasswd
uid:(NSString *)uid
ticket:(NSString *)ticket;
@end
NS_ASSUME_NONNULL_END

View File

@@ -40,4 +40,26 @@
+ (void)updateUserInfoSystemNotifyWith:(HttpRequestHelperCompletion)complection sysMsgNotify:(NSString *)sysMsgNotify uid:(NSString *)uid {
[self makeRequest:@"user/sysMsgNotify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, sysMsgNotify,uid, nil];
}
///
/// @param complection
/// @param newPasswd
/// @param phone
/// @param code
/// @param uid uid
/// @param ticket ticket
+ (void)setPayPasswordWithComplection:(HttpRequestHelperCompletion)complection newPasswd:(NSString *)newPasswd phone:(NSString *)phone code:(NSString *)code uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/reset" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, newPasswd, phone, code,uid,ticket, nil];
}
///
/// @param complection
/// @param newPasswd
/// @param oldPasswd
/// @param uid uid
/// @param ticket ticket
+ (void)modifPayPasswordWithComplection:(HttpRequestHelperCompletion)complection newPasswd:(NSString *)newPasswd oldPasswd:(NSString *)oldPasswd uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"user/paymentPasswd/modify" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, newPasswd,oldPasswd,uid,ticket, nil];
}
@end

View File

@@ -0,0 +1,21 @@
//
// XPMineModifPayPwdPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MainPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineModifPayPwdPresenter : MainPresenter
/// 修改支付密码
/// @param oldPasswd 旧的密码
/// @param newPasswd 新的密码
- (void)modifyPaymentPasswordWitholdPassword:(NSString *)oldPasswd
newPassword:(NSString *)newPasswd;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,36 @@
//
// XPMineModifPayPwdPresenter.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineModifPayPwdPresenter.h"
#import "Api+Mine.h"
///Tool
#import "DESEncrypt.h"
#import "AccountInfoStorage.h"
#import "XPConstant.h"
///P
#import "XPMineModifPayProtocol.h"
@implementation XPMineModifPayPwdPresenter
///
/// @param oldPasswd
/// @param newPasswd
- (void)modifyPaymentPasswordWitholdPassword:(NSString *)oldPasswd
newPassword:(NSString *)newPasswd {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
NSString * newpasswordDes = [DESEncrypt encryptUseDES:newPasswd key:KeyWithType(KeyType_PasswordEncode)];
NSString * oldpasswordDes = [DESEncrypt encryptUseDES:oldPasswd key:KeyWithType(KeyType_PasswordEncode)];
[Api modifPayPasswordWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] modifPayPasswordSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] newPasswd:newpasswordDes oldPasswd:oldpasswordDes uid:uid ticket:ticket];
}
@end

View File

@@ -0,0 +1,25 @@
//
// XPMinePayPwdPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MainPresenter.h"
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMinePayPwdPresenter : MainPresenter
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
/// 设置支付密码
/// @param password 支付密码
/// @param phone 手机号
/// @param veriftCode 验证码
- (void)setPayPassword:(NSString *)password phone:(NSString *)phone veriftCode:(NSString *)veriftCode;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,46 @@
//
// XPMinePayPwdPresenter.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMinePayPwdPresenter.h"
///Api
#import "Api+Mine.h"
///P
#import "XPMinePayPwdProtocol.h"
///Tool
#import "DESEncrypt.h"
#import "XPConstant.h"
#import "AccountInfoStorage.h"
@implementation XPMinePayPwdPresenter
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
[Api phoneSmsCode:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:phone type:typeStr];
}
///
/// @param password
/// @param phone
/// @param veriftCode
- (void)setPayPassword:(NSString *)password phone:(NSString *)phone veriftCode:(NSString *)veriftCode {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
NSString * newpasswordDes = [DESEncrypt encryptUseDES:password key:KeyWithType(KeyType_PasswordEncode)];
[Api setPayPasswordWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] setPayPasswordSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] newPasswd:newpasswordDes phone:phone code:veriftCode uid:uid ticket:ticket];
}
@end

View File

@@ -0,0 +1,20 @@
//
// XPMineResetPayPasswordPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MainPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineResetPayPasswordPresenter : MainPresenter
/// 重置支付密码
/// @param password 支付密码
/// @param phone 手机号
/// @param veriftCode 验证码
- (void)resetPayPassword:(NSString *)password phone:(NSString *)phone veriftCode:(NSString *)veriftCode;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,35 @@
//
// XPMineResetPayPasswordPresenter.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineResetPayPasswordPresenter.h"
///Api
#import "Api+Mine.h"
///Tool
#import "AccountInfoStorage.h"
#import "DESEncrypt.h"
#import "XPConstant.h"
///P
#import "XPMineResetPayPasswordProtocol.h"
@implementation XPMineResetPayPasswordPresenter
///
/// @param password
/// @param phone
/// @param veriftCode
- (void)resetPayPassword:(NSString *)password phone:(NSString *)phone veriftCode:(NSString *)veriftCode {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
NSString * newpasswordDes = [DESEncrypt encryptUseDES:password key:KeyWithType(KeyType_PasswordEncode)];
[Api setPayPasswordWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] resetPayPasswordSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] newPasswd:newpasswordDes phone:phone code:veriftCode uid:uid ticket:ticket];
}
@end

View File

@@ -95,4 +95,6 @@
}] uid:uid];
}
@end

View File

@@ -0,0 +1,26 @@
//
// XPMineVerifIdentityPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import "MainPresenter.h"
#import "XPEnum.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineVerifIdentityPresenter : MainPresenter
/// 获取手机的验证码
/// @param phone 手机号
/// @param type 类型
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type;
/// 校验手机验证码接口
/// @param moblieNum 手机号码
/// @param code 验证码
- (void)checkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,45 @@
//
// XPMineVerifIdentityPresenter.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineVerifIdentityPresenter.h"
///Api
#import "Api.h"
///P
#import "XPMineVerifIdentityProtocol.h"
///Tool
#import "AccountInfoStorage.h"
@implementation XPMineVerifIdentityPresenter
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type {
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
[Api phoneSmsCode:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:phone type:typeStr];
}
///
/// @param moblieNum
/// @param code
- (void)checkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code {
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
[Api checkMoblieCodeWithComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] checkMoblieCodeWithMoblieSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:moblieNum code:code uid:uid ticket:ticket];
}
@end

View File

@@ -0,0 +1,19 @@
//
// XPMineModifPayProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMineModifPayProtocol <NSObject>
///修改支付密码成功
- (void)modifPayPasswordSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,19 @@
//
// XPMInePayPwdProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMinePayPwdProtocol <NSObject>
///请求手机号的验证码成功
- (void)phoneSmsCodeSuccess;
///设置支付密码成功
- (void)setPayPasswordSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,18 @@
//
// XPMineResetPayPasswordProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMineResetPayPasswordProtocol <NSObject>
///重置支付密码
- (void)resetPayPasswordSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,19 @@
//
// XPMineVerifIdentityProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol XPMineVerifIdentityProtocol <NSObject>
///请求手机号的验证码成功
- (void)phoneSmsCodeSuccess;
///验证绑定手机成功
- (void)checkMoblieCodeWithMoblieSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -119,7 +119,7 @@
[self.accountView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self);
make.height.mas_equalTo(60);
make.top.mas_equalTo(self.levelLabel.mas_bottom).offset(16);
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(30);
}];
}

View File

@@ -0,0 +1,19 @@
//
// XPMineModifPayPwdView.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPMineModifPayPwdView : UIView
///输入框
@property (nonatomic,strong, readonly) UITextField *contentTextField;
///占位
@property (nonatomic,copy) NSString *placeholder;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,113 @@
//
// XPMineModifPayPwdView.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineModifPayPwdView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIButton+EnlargeTouchArea.h"
@interface XPMineModifPayPwdView ()
///
@property (nonatomic,strong) UITextField *contentTextField;
///
@property (nonatomic,strong) UIButton *commandButton;
///线
@property (nonatomic,strong) UIView * partLineView;
@end
@implementation XPMineModifPayPwdView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Response
- (void)onClickHiddenBtn:(UIButton *)btn {
btn.selected = !btn.selected;
self.contentTextField.secureTextEntry = !self.contentTextField.secureTextEntry;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.contentTextField];
[self addSubview:self.commandButton];
[self addSubview:self.partLineView];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(50);
}];
[self.contentTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self).offset(15);
make.top.bottom.mas_equalTo(self);
}];
[self.commandButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self).offset(-32);
make.centerY.mas_equalTo(self.contentTextField);
make.left.mas_equalTo(self.contentTextField.mas_right).offset(10);
}];
[self.partLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self).offset(5);
make.right.mas_equalTo(self).offset(-5);
make.bottom.mas_equalTo(self);
make.height.mas_equalTo(1);
}];
}
#pragma mark - Getters And Setters
- (void)setPlaceholder:(NSString *)placeholder {
_placeholder = placeholder;
self.contentTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSFontAttributeName : self.contentTextField.font, NSForegroundColorAttributeName : [ThemeColor secondTextColor]}];
}
- (UIView *)partLineView {
if (!_partLineView) {
_partLineView = [[UIView alloc] init];
}
return _partLineView;
}
- (UITextField *)contentTextField {
if (!_contentTextField) {
_contentTextField = [[UITextField alloc] init];
_contentTextField.secureTextEntry = YES;
_contentTextField.font = [UIFont systemFontOfSize:13];
_contentTextField.textColor = [ThemeColor mainTextColor];
_contentTextField.tintColor = [ThemeColor appMainColor];
}
return _contentTextField;
}
- (UIButton *)commandButton {
if (!_commandButton) {
_commandButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_commandButton setEnlargeEdgeWithTop:20 right:20 bottom:20 left:20];
[_commandButton addTarget:self action:@selector(onClickHiddenBtn:) forControlEvents:UIControlEventTouchUpInside];
[_commandButton setImage:[UIImage imageNamed:@"mine_setting_modif_pay_pwd_hidden"] forState:UIControlStateNormal];
[_commandButton setImage:[UIImage imageNamed:@"mine_setting_modif_pay_pwd_show"] forState:UIControlStateSelected];
_commandButton.titleLabel.font = [UIFont systemFontOfSize:12];
[_commandButton setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
}
return _commandButton;
}
@end

View File

@@ -0,0 +1,39 @@
//
// XPMinePayPwdInputView.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
///输入框类型
///TTPayPwdInputViewTypePwd-密码
///TTPayPwdInputViewTypeRepeatPwd-重复密码
///TTPayPwdInputViewTypeVerification-验证码
typedef NS_ENUM(NSInteger, XPPayPwdInputViewType) {
XPPayPwdInputViewTypePwd,
XPPayPwdInputViewTypeRepeatPwd,
XPPayPwdInputViewTypeVerification
};
@interface XPMinePayPwdInputView : UIView
@property (nonatomic, assign) XPPayPwdInputViewType type;//输入框类型
@property (nonatomic, copy) void (^fetchVerificationHandler)(void);//获取验证码
/// 获取当前文本框内容
- (NSString *)contentText;
/// 验证码倒计时更新
/// @param seconds 秒数
- (void)verificationCountdownUpdate:(NSInteger)seconds;
/// 验证码倒计时结束
- (void)verificationCountdownFinish;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,202 @@
//
// XPMinePayPwdInputView.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMinePayPwdInputView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIButton+EnlargeTouchArea.h"
@interface XPMinePayPwdInputView()
///线
@property (nonatomic, strong) UIView *lineView;
///
@property (nonatomic, strong) UITextField *contentTextField;
///
@property (nonatomic, strong) UIButton *statusButton;
///
@property (nonatomic, assign) BOOL isSecurity;
///
@property (nonatomic, assign) int contentLimit;
///
@property (nonatomic, assign) UIKeyboardType keyboardType;
///
@property (nonatomic, strong) NSString *placeholder;
@end
@implementation XPMinePayPwdInputView
- (instancetype)init {
if (self = [super init]) {
[self initSubviews];
}
return self;
}
- (void)initSubviews {
self.backgroundColor = [ThemeColor appCellBackgroundColor];
[self addSubview:self.contentTextField];
[self addSubview:self.statusButton];
[self addSubview:self.lineView];
[self makeConstriants];
}
- (void)makeConstriants {
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self).inset(25);
make.bottom.mas_equalTo(0);
make.height.mas_equalTo(0.5);
}];
[self.statusButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.lineView);
make.bottom.mas_equalTo(-10);
}];
[self.contentTextField mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.statusButton);
make.left.mas_equalTo(self.lineView);
make.right.mas_equalTo(self.statusButton.mas_left).offset(-10);
make.height.mas_equalTo(44);
}];
}
#pragma mark - Event
- (void)edingtingChange {
if (self.contentLimit && self.contentTextField.text.length > self.contentLimit) {
self.contentTextField.text = [self.contentTextField.text substringToIndex:self.contentLimit];
}
}
- (void)onClickStatusButton:(UIButton *)sender {
if (self.type == XPPayPwdInputViewTypeVerification) {
!self.fetchVerificationHandler ?: self.fetchVerificationHandler();
return;
}
sender.selected = !sender.selected;
self.isSecurity = !sender.selected;
}
#pragma mark - Public
- (NSString *)contentText {
return self.contentTextField.text;
}
///
/// @param seconds
- (void)verificationCountdownUpdate:(NSInteger)seconds {
if (self.type == XPPayPwdInputViewTypeVerification) {
[self.statusButton setTitle:[NSString stringWithFormat:@"%ld后重试", (long)seconds] forState:UIControlStateNormal];
[self.statusButton setEnabled:NO];
[self.statusButton setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
}
}
///
- (void)verificationCountdownFinish {
if (self.type == XPPayPwdInputViewTypeVerification) {
[self.statusButton setTitle:@"重新发送" forState:UIControlStateNormal];
[self.statusButton setEnabled:YES];
[self.statusButton setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
}
}
#pragma mark - Getters And Setters
- (void)setType:(XPPayPwdInputViewType)type {
_type = type;
switch (type) {
case XPPayPwdInputViewTypePwd:
{
self.contentLimit = 6;
self.isSecurity = YES;
self.keyboardType = UIKeyboardTypeNumberPad;
self.placeholder = [NSString stringWithFormat:@"设置支付密码"];
}
break;
case XPPayPwdInputViewTypeRepeatPwd:
{
self.contentLimit = 6;
self.isSecurity = YES;
self.keyboardType = UIKeyboardTypeNumberPad;
self.placeholder = [NSString stringWithFormat:@"再次输支付密码"];
}
break;
case XPPayPwdInputViewTypeVerification:
{
self.contentLimit = 5;
self.isSecurity = NO;
self.keyboardType = UIKeyboardTypeNumberPad;
self.placeholder = @"请输入验证码";
[self.statusButton setTitle:@"获取验证码" forState:UIControlStateNormal];
[self.statusButton setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
[self.statusButton setImage:nil forState:UIControlStateNormal];
[self.statusButton setImage:nil forState:UIControlStateSelected];
}
break;
default:
break;
}
}
- (void)setIsSecurity:(BOOL)isSecurity {
_isSecurity = isSecurity;
self.statusButton.selected = !isSecurity;
self.contentTextField.secureTextEntry = isSecurity;
}
- (void)setPlaceholder:(NSString *)placeholder {
_placeholder = placeholder;
self.contentTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSFontAttributeName : self.contentTextField.font, NSForegroundColorAttributeName : [ThemeColor secondTextColor]}];
}
- (void)setKeyboardType:(UIKeyboardType)keyboardType {
_keyboardType = keyboardType;
self.contentTextField.keyboardType = keyboardType;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
- (UITextField *)contentTextField {
if (!_contentTextField) {
_contentTextField = [[UITextField alloc] init];
_contentTextField.secureTextEntry = YES;
_contentTextField.font = [UIFont systemFontOfSize:13];
_contentTextField.textColor = [ThemeColor mainTextColor];
[_contentTextField addTarget:self action:@selector(edingtingChange) forControlEvents:UIControlEventEditingChanged];
}
return _contentTextField;
}
- (UIButton *)statusButton {
if (!_statusButton) {
_statusButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_statusButton addTarget:self action:@selector(onClickStatusButton:) forControlEvents:UIControlEventTouchUpInside];
[_statusButton setImage:[UIImage imageNamed:@"mine_setting_pay_password_hidden"] forState:UIControlStateNormal];
[_statusButton setImage:[UIImage imageNamed:@"mine_setting_pay_password_show"] forState:UIControlStateSelected];
_statusButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_statusButton setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
[_statusButton setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
[_statusButton setEnlargeEdgeWithTop:8 right:8 bottom:8 left:8];
}
return _statusButton;
}
@end

View File

@@ -0,0 +1,30 @@
//
// XPMineVerifIdentityView.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger,XPMineVerifIdentityType ) {
XPMineVerifIdentityType_Phone, ///手机号
XPMineVerifIdentityType_Sms,///验证码
};
typedef void(^VerifIdentitySmsCodeBlock)(UIButton *sender);
@interface XPMineVerifIdentityView : UIView
///输入框
@property (nonatomic, strong, readonly) UITextField *contentTextField;
///发送验证码
@property (nonatomic, strong, readonly) UIButton *smsCodeButton;
///点击了smsCode
@property (nonatomic,copy) VerifIdentitySmsCodeBlock smsCodeBlock;
///
@property (nonatomic,assign) XPMineVerifIdentityType type;
///占位
@property (nonatomic, strong) NSString *placeholder;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,127 @@
//
// XPMineVerifIdentityView.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineVerifIdentityView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
@interface XPMineVerifIdentityView ()
///
@property (nonatomic,strong) UIStackView *stackView;
///线
@property (nonatomic, strong) UIView *lineView;
///
@property (nonatomic, strong) UITextField *contentTextField;
///
@property (nonatomic, strong) UIButton *smsCodeButton;
@end
@implementation XPMineVerifIdentityView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Response
- (void)smsCodeButtonAction:(UIButton *)sender {
if (self.smsCodeBlock) {
self.smsCodeBlock(sender);
}
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.stackView];
[self addSubview:self.lineView];
[self.stackView addArrangedSubview:self.contentTextField];
[self.stackView addArrangedSubview:self.smsCodeButton];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(50);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self).offset(15);
make.right.mas_equalTo(self).offset(-32);
make.top.bottom.mas_equalTo(self);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self).offset(5);
make.right.mas_equalTo(self).offset(-5);
make.bottom.mas_equalTo(self);
make.height.mas_equalTo(1);
}];
}
#pragma mark - Getters And Setters
- (void)setType:(XPMineVerifIdentityType)type {
_type = type;
switch (_type) {
case XPMineVerifIdentityType_Phone:
self.smsCodeButton.hidden = YES;
break;
default:
break;
}
}
- (void)setPlaceholder:(NSString *)placeholder {
_placeholder = placeholder;
self.contentTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSFontAttributeName : self.contentTextField.font, NSForegroundColorAttributeName : [ThemeColor secondTextColor]}];
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisHorizontal;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentCenter;
_stackView.spacing = 10;
}
return _stackView;
}
- (UITextField *)contentTextField {
if (!_contentTextField) {
_contentTextField = [[UITextField alloc] init];
_contentTextField.secureTextEntry = YES;
_contentTextField.font = [UIFont systemFontOfSize:13];
_contentTextField.textColor = [ThemeColor mainTextColor];
_contentTextField.tintColor = [ThemeColor appMainColor];
}
return _contentTextField;
}
- (UIButton *)smsCodeButton {
if (!_smsCodeButton) {
_smsCodeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_smsCodeButton setTitle:@"发送验证码" forState:UIControlStateNormal];
[_smsCodeButton setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
[_smsCodeButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
_smsCodeButton.titleLabel.font = [UIFont systemFontOfSize:12];
_smsCodeButton.layer.masksToBounds = YES;
_smsCodeButton.layer.cornerRadius = 10;
[_smsCodeButton addTarget:self action:@selector(smsCodeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[_smsCodeButton setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
}
return _smsCodeButton;
}
@end

View File

@@ -58,7 +58,7 @@
- (void)makeConstriants {
[self.pointView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.view).offset(15);
make.top.mas_equalTo(kNavigationHeight+17);
make.top.mas_equalTo(17);
make.height.width.mas_equalTo(7);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -0,0 +1,17 @@
//
// XPMineModifPayPwdViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
// 修改支付密码
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class UserInfoModel;
@interface XPMineModifPayPwdViewController : MvpViewController
///用户信息
@property (nonatomic,strong) UserInfoModel *userInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,198 @@
//
// XPMineModifPayPwdViewController.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineModifPayPwdViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "UIButton+EnlargeTouchArea.h"
#import "UIImage+Utils.h"
///View
#import "XPMineModifPayPwdView.h"
///P
#import "XPMineModifPayPwdPresenter.h"
#import "XPMineModifPayProtocol.h"
///VC
#import "XPMineSettingViewController.h"
#import "XPMineVerifIdentityViewController.h"
@interface XPMineModifPayPwdViewController ()<XPMineModifPayProtocol>
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) XPMineModifPayPwdView *currentPwdView;
///
@property (nonatomic,strong) XPMineModifPayPwdView *newsPwdView;
///
@property (nonatomic,strong) XPMineModifPayPwdView *checkPwdView;
///
@property (nonatomic, strong) UIButton *forgetBtn;
///
@property (nonatomic, strong) UIButton *submitBtn;
@end
@implementation XPMineModifPayPwdViewController
- (XPMineModifPayPwdPresenter *)createPresenter {
return [[XPMineModifPayPwdPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
[self initEvents];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = @"修改支付密码";
[self.view addSubview:self.stackView];
[self.view addSubview:self.forgetBtn];
[self.view addSubview:self.submitBtn];
[self.stackView addArrangedSubview:self.currentPwdView];
[self.stackView addArrangedSubview:self.newsPwdView];
[self.stackView addArrangedSubview:self.checkPwdView];
}
- (void)initSubViewConstraints {
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
}];
[self.forgetBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.view).offset(-32);
make.top.mas_equalTo(self.stackView.mas_bottom).offset(8);
}];
[self.submitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.stackView.mas_bottom).offset(45);
make.right.mas_equalTo(self.view).offset(-32);
make.left.mas_equalTo(self.view).offset(32);
make.height.mas_equalTo(45);
}];
}
- (void)initEvents {
@weakify(self);
RAC(self.submitBtn, enabled) = [RACSignal combineLatest:@[self.currentPwdView.contentTextField.rac_textSignal, self.newsPwdView.contentTextField.rac_textSignal, self.checkPwdView.contentTextField.rac_textSignal] reduce:^id _Nonnull(NSString *currentPassword, NSString *newsPassword, NSString *checkPassword){
return @(currentPassword.length == 6 && newsPassword.length == 6 && checkPassword.length == 6);
}];
[[self.submitBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
if (![self.newsPwdView.contentTextField.text isEqual:self.checkPwdView.contentTextField.text]) {
[self showErrorToast:@"两次输入的新密码不一致哦"];
return;
}
if (![self isPureNum:self.checkPwdView.contentTextField.text] || ![self isPureNum:self.newsPwdView.contentTextField.text]) {
[self showErrorToast:@"新支付密码必须为纯数字"];
return;
}
[self.presenter modifyPaymentPasswordWitholdPassword:self.currentPwdView.contentTextField.text newPassword:self.newsPwdView.contentTextField.text];
}];
[[self.forgetBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
XPMineVerifIdentityViewController * VC= [[XPMineVerifIdentityViewController alloc] init];
VC.userInfo = self.userInfo;
[self.navigationController pushViewController:VC animated:YES];
}];
}
///
- (BOOL)isPureNum:(NSString *)text {
if (!text) {
return NO;
}
NSScanner *scan = [NSScanner scannerWithString:text];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
#pragma mark - XPMineModifPayProtocol
- (void)modifPayPasswordSuccess {
[self showSuccessToast:@"修改支付密码成功"];
for (UIViewController *VC in self.navigationController.viewControllers) {
if ([VC isKindOfClass:[XPMineSettingViewController class]]) {
[self.navigationController popToViewController:VC animated:YES];
return;
}
}
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Getters And Setters
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisVertical;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentFill;
_stackView.spacing = 0;
}
return _stackView;
}
- (XPMineModifPayPwdView *)currentPwdView {
if (!_currentPwdView) {
_currentPwdView = [[XPMineModifPayPwdView alloc] init];
_currentPwdView.placeholder = @"请输入当前支付密码";
_currentPwdView.contentTextField.keyboardType = UIKeyboardTypeNumberPad;
}
return _currentPwdView;
}
- (XPMineModifPayPwdView *)newsPwdView {
if (!_newsPwdView) {
_newsPwdView = [[XPMineModifPayPwdView alloc] init];
_newsPwdView.placeholder = @"输入支付密码";
_newsPwdView.contentTextField.keyboardType = UIKeyboardTypeNumberPad;
}
return _newsPwdView;
}
- (XPMineModifPayPwdView *)checkPwdView {
if (!_checkPwdView) {
_checkPwdView = [[XPMineModifPayPwdView alloc] init];
_checkPwdView.placeholder = @"再次输入支付密码";
_checkPwdView.contentTextField.keyboardType = UIKeyboardTypeNumberPad;
}
return _checkPwdView;
}
- (UIButton *)submitBtn {
if (!_submitBtn) {
_submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_submitBtn setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_submitBtn setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
[_submitBtn setTitle:@"确定" forState:UIControlStateNormal];
_submitBtn.titleLabel.font = [UIFont systemFontOfSize:18];
_submitBtn.layer.masksToBounds = YES;
_submitBtn.layer.cornerRadius = 45/2;
_submitBtn.enabled = YES;
[_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];
}
return _submitBtn;
}
- (UIButton *)forgetBtn {
if (!_forgetBtn) {
_forgetBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_forgetBtn setEnlargeEdgeWithTop:5 right:5 bottom:5 left:5];
[_forgetBtn setTitleColor:[ThemeColor secondTextColor] forState:UIControlStateNormal];
[_forgetBtn setTitle:@"忘记密码?" forState:UIControlStateNormal];
_forgetBtn.titleLabel.font = [UIFont systemFontOfSize:13];
}
return _forgetBtn;
}
@end

View File

@@ -0,0 +1,24 @@
//
// XPMinePayPwdViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
//设置支付密码(初次) 重置支付密码
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, PayPasswordType) {
PayPasswordType_Set,///设置支付密码
PayPasswordType_Reset,///重置支付密码
};
@class UserInfoModel;
@interface XPMinePayPwdViewController : MvpViewController
///
@property (nonatomic,assign) PayPasswordType type;
///用户信息
@property (nonatomic,strong) UserInfoModel *userInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,242 @@
//
// XPMinePayPwdViewController.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMinePayPwdViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "UIImage+Utils.h"
#import "CountDownHelper.h"
///Model
#import "UserInfoModel.h"
///View
#import "XPMinePayPwdInputView.h"
///P
#import "XPMinePayPwdPresenter.h"
#import "XPMinePayPwdProtocol.h"
@interface XPMinePayPwdViewController ()<XPMinePayPwdProtocol, CountDownHelperDelegate>
///
@property (nonatomic, strong) XPMinePayPwdInputView *pwdInputView;
///
@property (nonatomic, strong) XPMinePayPwdInputView *repeatPwdInputView;
///
@property (nonatomic, strong) XPMinePayPwdInputView *verificationCodeInputView;
///
@property (nonatomic, strong) UIButton *submitButton;
@property (nonatomic, strong) UILabel *tipsLabel;
@end
@implementation XPMinePayPwdViewController
- (XPMinePayPwdPresenter *)createPresenter {
return [[XPMinePayPwdPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubviews];
self.title = [NSString stringWithFormat:@"设置支付密码"];
//
@weakify(self)
[self.verificationCodeInputView setFetchVerificationHandler:^{
@strongify(self)
if ([[self phoneNumber] length] == 0) {
[self showErrorToast:@"获取手机号失败"];
return;
}
self.tipsLabel.hidden = YES;
//
[self.presenter phoneSmsCode:[self phoneNumber] type:GetSmsType_Reset_ZF];
}];
}
- (void)initSubviews {
[self.view addSubview:self.pwdInputView];
[self.view addSubview:self.repeatPwdInputView];
[self.view addSubview:self.verificationCodeInputView];
[self.view addSubview:self.tipsLabel];
[self.view addSubview:self.submitButton];
[self makeConstriants];
}
- (void)makeConstriants {
[self.pwdInputView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(0);
make.left.right.mas_equalTo(0);
make.height.mas_equalTo(70);
}];
[self.repeatPwdInputView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.pwdInputView.mas_bottom);
make.left.right.height.mas_equalTo(self.pwdInputView);
}];
[self.verificationCodeInputView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.repeatPwdInputView.mas_bottom);
make.left.right.height.mas_equalTo(self.pwdInputView);
}];
[self.submitButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.verificationCodeInputView.mas_bottom).offset(86);
make.left.right.mas_equalTo(self.view).inset(36);
make.height.mas_equalTo(44);
}];
[self.tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.verificationCodeInputView.mas_bottom).offset(20);
make.left.right.mas_equalTo(self.view).inset(25);
}];
}
#pragma mark - CountDownHelperDelegate
- (void)onCountdownOpen:(int)time {
[self.verificationCodeInputView verificationCountdownUpdate:time];
}
- (void)onCountdownFinish {
[self.verificationCodeInputView verificationCountdownFinish];
}
#pragma mark - XPMinePayPwdProtocol
- (void)phoneSmsCodeSuccess {
self.tipsLabel.hidden = NO;
[self showSuccessToast:@"验证码发送成功"];
[[CountDownHelper shareHelper] openCountdownWithTime:60];
}
- (void)setPayPasswordSuccess {
NSString *message = [NSString stringWithFormat:@"设置支付密码成功"];
[self showSuccessToast:message];
@weakify(self)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@strongify(self)
[self.navigationController popViewControllerAnimated:YES];
});
}
#pragma mark - event
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
}
- (void)onClickSubmitButton {
[self.view endEditing:YES];
NSString *pwd = [self.pwdInputView contentText];
NSString *repeatPwd = [self.repeatPwdInputView contentText];
NSString *code = [self.verificationCodeInputView contentText];
//
if (pwd.length != 6) {
NSString *msg = [NSString stringWithFormat:@"支付密码必须为6位的纯数字哦"];
[self showErrorToast:msg];
return;
}
//
if (![self isPureNum:pwd]) {
NSString *msg = [NSString stringWithFormat:@"支付密码必须为纯数字"];
[self showErrorToast:msg];
return;
}
//
if (![pwd isEqualToString:repeatPwd]) {
[self showErrorToast:@"两次输入密码不一致"];
return;
}
if (code.length == 0) {
[self showErrorToast:@"请输入验证码"];
return;
}
//
[self.presenter setPayPassword:pwd phone:[self phoneNumber] veriftCode:code];
}
#pragma mark - Private
/** */
- (BOOL)isPureNum:(NSString *)text {
if (!text) {
return NO;
}
NSScanner *scan = [NSScanner scannerWithString:text];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
- (NSString *)phoneNumber {
return self.userInfo.phone;
}
#pragma mark - Getter && Setter
- (XPMinePayPwdInputView *)pwdInputView {
if (!_pwdInputView) {
_pwdInputView = [[XPMinePayPwdInputView alloc] init];
_pwdInputView.type = XPPayPwdInputViewTypePwd;
}
return _pwdInputView;
}
- (XPMinePayPwdInputView *)repeatPwdInputView {
if (!_repeatPwdInputView) {
_repeatPwdInputView = [[XPMinePayPwdInputView alloc] init];
_repeatPwdInputView.type = XPPayPwdInputViewTypeRepeatPwd;
}
return _repeatPwdInputView;
}
- (XPMinePayPwdInputView *)verificationCodeInputView {
if (!_verificationCodeInputView) {
_verificationCodeInputView = [[XPMinePayPwdInputView alloc] init];
_verificationCodeInputView.type = XPPayPwdInputViewTypeVerification;
}
return _verificationCodeInputView;
}
- (UIButton *)submitButton {
if (!_submitButton) {
_submitButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_submitButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_submitButton setTitle:@"确定" forState:UIControlStateNormal];
_submitButton.titleLabel.font = [UIFont systemFontOfSize:15];
_submitButton.layer.masksToBounds = YES;
_submitButton.layer.cornerRadius = 44/2;
[_submitButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_submitButton addTarget:self action:@selector(onClickSubmitButton) forControlEvents:UIControlEventTouchUpInside];
}
return _submitButton;
}
- (UILabel *)tipsLabel {
if (!_tipsLabel) {
_tipsLabel = [[UILabel alloc] init];
_tipsLabel.textColor = [ThemeColor secondTextColor];
_tipsLabel.font = [UIFont systemFontOfSize:13];
_tipsLabel.numberOfLines = 0;
_tipsLabel.hidden = YES;
NSString *phonePrefix = [[self phoneNumber] substringToIndex:3];
NSString *phoneSuffix = [[self phoneNumber] substringFromIndex:7];
_tipsLabel.text = [NSString stringWithFormat:@"验证码已发送至您绑定的手机%@****%@", phonePrefix, phoneSuffix];
}
return _tipsLabel;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPMineResetPayPwdViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
// 重设支付密码
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineResetPayPwdViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,138 @@
//
// XPMineResetPayPwdViewController.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineResetPayPwdViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "UIImage+Utils.h"
///View
#import "XPMineModifPayPwdView.h"
///P
#import "XPMineResetPayPasswordPresenter.h"
#import "XPMineResetPayPasswordProtocol.h"
///VC
#import "XPMineSettingViewController.h"
@interface XPMineResetPayPwdViewController ()<XPMineResetPayPasswordProtocol>
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) XPMineModifPayPwdView *passwordView;
///
@property (nonatomic,strong) XPMineModifPayPwdView *verificationCodeInputView;
///
@property (nonatomic,strong) UIButton *submitButton;
@end
@implementation XPMineResetPayPwdViewController
- (XPMineResetPayPasswordPresenter *)createPresenter {
return [[XPMineResetPayPasswordPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
[self initEvents];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = @"重置支付密码";
[self.view addSubview:self.stackView];
[self.view addSubview:self.submitButton];
[self.stackView addArrangedSubview:self.passwordView];
[self.stackView addArrangedSubview:self.verificationCodeInputView];
}
- (void)initSubViewConstraints {
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
}];
[self.submitButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.stackView.mas_bottom).offset(45);
make.right.left.mas_equalTo(self.view).inset(32);
make.height.mas_equalTo(45);
}];
}
- (void)initEvents {
@weakify(self);
RAC(self.submitButton, enabled) = [RACSignal combineLatest:@[self.passwordView.contentTextField.rac_textSignal, self.verificationCodeInputView.contentTextField.rac_textSignal] reduce:^id _Nonnull(NSString *password, NSString *checkPassword){
return @(password.length == 6 && checkPassword.length == 6);
}];
[[self.submitButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
if (![self.passwordView.contentTextField.text isEqual:self.verificationCodeInputView.contentTextField.text]) {
[self showErrorToast:@"两次输入的密码不一致哦"];
}
[self.presenter resetPayPassword:self.passwordView.contentTextField.text phone:@"" veriftCode:@""];
}];
}
#pragma mark - XPMineResetPayPasswordProtocol
- (void)resetPayPasswordSuccess {
[self showErrorToast:@"重置支付密码成功"];
for (UIViewController *VC in self.navigationController.viewControllers) {
if ([VC isKindOfClass:[XPMineSettingViewController class]]) {
[self.navigationController popToViewController:VC animated:YES];
return;
}
}
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Getters And Setters
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisVertical;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentFill;
_stackView.spacing = 0;
}
return _stackView;
}
- (XPMineModifPayPwdView *)passwordView {
if (!_passwordView) {
_passwordView = [[XPMineModifPayPwdView alloc] init];
_passwordView.placeholder = @"输入支付密码";
}
return _passwordView;
}
- (XPMineModifPayPwdView *)verificationCodeInputView {
if (!_verificationCodeInputView) {
_verificationCodeInputView = [[XPMineModifPayPwdView alloc] init];
_verificationCodeInputView.placeholder = @"再次输入支付密码";
}
return _verificationCodeInputView;
}
- (UIButton *)submitButton {
if (!_submitButton) {
_submitButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_submitButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_submitButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
[_submitButton setTitle:@"确定" forState:UIControlStateNormal];
_submitButton.layer.masksToBounds = YES;
_submitButton.layer.cornerRadius = 45/2;
_submitButton.enabled = NO;
[_submitButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_submitButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor disableButtonColor], [ThemeColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled];
}
return _submitButton;
}
@end

View File

@@ -14,6 +14,7 @@
#import "XPHtmlUrl.h"
///Model
#import "XPMineSettingItemModel.h"
#import "UserInfoModel.h"
///View
#import "XPMineSettingTableViewCell.h"
///P
@@ -23,7 +24,12 @@
#import "XPMineAboutUsViewController.h"
#import "XPMineFeedbackViewController.h"
#import "XPMineNotificaViewController.h"
#import "XPMinePayPwdViewController.h"
#import "XPMineModifPayPwdViewController.h"
///VC
#import "XPWebViewController.h"
#import "XPLoginVerifBindPhoneViewController.h"
#import "XPLoginBindPhoneResultViewController.h"
@interface XPMineSettingViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineSettingProtocol>
///
@@ -37,7 +43,6 @@
@end
@implementation XPMineSettingViewController
- (XPMineSettingPresent *)createPresenter {
return [[XPMineSettingPresent alloc] init];
}
@@ -68,25 +73,41 @@
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:
{
//
if (self.userInfo.isBindPhone) { //
XPLoginBindPhoneResultViewController *vc = [[XPLoginBindPhoneResultViewController alloc] init];
vc.userInfo = _userInfo;
[self.navigationController pushViewController:vc animated:YES];
}else {
XPLoginVerifBindPhoneViewController *vc = [[XPLoginVerifBindPhoneViewController alloc] init];
vc.bindingPhoneNumType = XPBindingPhoneNumTypeNormal;
vc.userInfo = _userInfo;
[self.navigationController pushViewController:vc animated:YES];
}
}
break;
case XPMineSettingItemType_Pay_Password:
{
if (!self.userInfo.isBindPhone) {
[self showErrorToast:@"请先绑定手机号码哦~"];
return;
}
//
if (self.userInfo.isBindPaymentPwd) {
XPMineModifPayPwdViewController *vc = [[XPMineModifPayPwdViewController alloc] init];
vc.userInfo = self.userInfo;
[self.navigationController pushViewController:vc animated:YES];
} else {
XPMinePayPwdViewController *vc = [[XPMinePayPwdViewController alloc] init];
vc.userInfo = self.userInfo;
[self.navigationController pushViewController:vc animated:YES];
}
}
break;
case XPMineSettingItemType_Notification_Remind:
@@ -108,7 +129,7 @@
break;
case XPMineSettingItemType_Clear_Memory:
{
#warning to do
}
break;
case XPMineSettingItemType_About_Us:
@@ -180,6 +201,7 @@
}
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
self.userInfo = userInfo;
[self.presenter getMineSettingDataSourceWith:userInfo];
}
@@ -207,11 +229,11 @@
- (UIButton *)logoutButton {
if (!_logoutButton) {
_logoutButton = [UIButton buttonWithType:UIButtonTypeCustom];
_logoutButton.frame = CGRectMake(32, 40, KScreenWidth - 32* 2, 50);
_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];
}

View File

@@ -0,0 +1,17 @@
//
// XPMineVerifIdentityViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/18.
// 验证身份
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class UserInfoModel;
@interface XPMineVerifIdentityViewController : MvpViewController
///用户信息
@property (nonatomic,strong) UserInfoModel *userInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,174 @@
//
// XPMineVerifIdentityViewController.m
// xplan-ios
//
// Created by on 2021/9/18.
//
#import "XPMineVerifIdentityViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <ReactiveObjC/ReactiveObjC.h>
///Tool
#import "ThemeColor.h"
#import "CountDownHelper.h"
#import "UIImage+Utils.h"
///Model
#import "UserInfoModel.h"
///View
#import "XPMineVerifIdentityView.h"
///P
#import "XPMineVerifIdentityPresenter.h"
#import "XPMineVerifIdentityProtocol.h"
///VC
#import "XPMineResetPayPwdViewController.h"
@interface XPMineVerifIdentityViewController ()<XPMineVerifIdentityProtocol, CountDownHelperDelegate>
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) XPMineVerifIdentityView *phoneView;
///
@property (nonatomic,strong) XPMineVerifIdentityView *smsCodeView;
///
@property (nonatomic,strong) UIButton *nextButton;
@end
@implementation XPMineVerifIdentityViewController
- (XPMineVerifIdentityPresenter *)createPresenter {
return [[XPMineVerifIdentityPresenter alloc] init];;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
[self initEvents];
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[[CountDownHelper shareHelper] stopCountDown];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = @"验证身份";
self.phoneView.contentTextField.text = self.userInfo.phone;
self.phoneView.contentTextField.enabled = self.userInfo.phone.length > 0;
[CountDownHelper shareHelper].delegate = self;
[self.view addSubview:self.stackView];
[self.view addSubview:self.nextButton];
[self.stackView addArrangedSubview:self.phoneView];
[self.stackView addArrangedSubview:self.smsCodeView];
}
- (void)initSubViewConstraints {
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
}];
[self.nextButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.stackView.mas_bottom).offset(45);
make.right.mas_equalTo(self.view).offset(-32);
make.left.mas_equalTo(self.view).offset(32);
make.height.mas_equalTo(45);
}];
}
- (void)initEvents {
@weakify(self);
RAC(self.nextButton, enabled) = [RACSignal combineLatest:@[self.phoneView.contentTextField.rac_textSignal, self.smsCodeView.contentTextField.rac_textSignal] reduce:^id _Nonnull(NSString *phone, NSString * code){
return @(phone.length > 0 && code.length > 0);
}];
[[self.nextButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
[self.presenter checkMoblieCodeWithMoblie:self.phoneView.contentTextField.text code:self.smsCodeView.contentTextField.text];
}];
self.smsCodeView.smsCodeBlock = ^(UIButton * _Nonnull sender) {
@strongify(self);
if (self.phoneView.contentTextField.text.length > 0) {
[self.presenter phoneSmsCode:self.phoneView.contentTextField.text type:GetSmsType_Unbind_Phone];
} else {
[self showErrorToast:@"请输入手机号"];
}
};
}
#pragma mark - XPMineVerifIdentityProtocol
- (void)phoneSmsCodeSuccess {
self.smsCodeView.smsCodeButton.enabled = NO;
[self showSuccessToast:@"验证码发送成功"];
[[CountDownHelper shareHelper] openCountdownWithTime:60];
}
- (void)checkMoblieCodeWithMoblieSuccess {
[self showErrorToast:@"验证成功"];
[[CountDownHelper shareHelper] stopCountDown];
XPMineResetPayPwdViewController * vc = [[XPMineResetPayPwdViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - CountDownHelperDelegate
///
- (void)onCountdownOpen:(int)time {
[self.smsCodeView.smsCodeButton setTitle:[NSString stringWithFormat:@"%ds后重试", time] forState:UIControlStateDisabled];
}
///
- (void)onCountdownFinish {
self.smsCodeView.smsCodeButton.enabled= YES;
[self.smsCodeView.smsCodeButton setTitle:@"重新发送" forState:UIControlStateNormal];
}
#pragma mark - Getters And Setters
- (UIButton *)nextButton {
if (!_nextButton) {
_nextButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_nextButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
[_nextButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateDisabled];
[_nextButton setTitle:@"下一步" forState:UIControlStateNormal];
_nextButton.titleLabel.font = [UIFont systemFontOfSize:18];
_nextButton.layer.masksToBounds = YES;
_nextButton.layer.cornerRadius = 45/2;
_nextButton.enabled = NO;
[_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor disableButtonColor], [ThemeColor disableButtonColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled];
}
return _nextButton;
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisVertical;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentFill;
_stackView.spacing = 0;
}
return _stackView;
}
- (XPMineVerifIdentityView *)phoneView {
if (!_phoneView) {
_phoneView = [[XPMineVerifIdentityView alloc] init];
_phoneView.type = XPMineVerifIdentityType_Phone;
_phoneView.placeholder = @"请输入您的手机号码";
_phoneView.contentTextField.secureTextEntry = NO;
}
return _phoneView;
}
- (XPMineVerifIdentityView *)smsCodeView {
if (!_smsCodeView) {
_smsCodeView = [[XPMineVerifIdentityView alloc] init];
_smsCodeView.type = XPMineVerifIdentityType_Sms;
_smsCodeView.placeholder = @"请输入您收到的验证码";
_smsCodeView.contentTextField.secureTextEntry = NO;
}
return _smsCodeView;
}
@end

View File

@@ -37,6 +37,8 @@
@property (nonatomic,strong) XPMineHeadView *headView;
///
@property (nonatomic,strong) UIButton *settingButton;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
@end
@@ -64,6 +66,7 @@
#pragma mark - Response
- (void)settingButtonAction:(UIButton *)sender {
XPMineSettingViewController * settingVC = [[XPMineSettingViewController alloc] init];
settingVC.userInfo = self.userInfo;
[self.navigationController pushViewController:settingVC animated:YES];
}
@@ -222,6 +225,7 @@
}
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
self.userInfo = userInfo;
self.headView.userInfo = userInfo;
}
#pragma mark - XPMineMatchTableViewCellDelegate