From a8a663a864ab8c3da6dbfba55f06dffed90d669b Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Sat, 18 Sep 2021 20:05:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=20=E8=AE=BE=E7=BD=AE=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xplan-ios.xcodeproj/project.pbxproj | 110 +++++ .../Contents.json | 21 + .../login_bind_phone_bg@2x.png | Bin 0 -> 21879 bytes .../Mine/Setting/Contents.json | 6 + .../Contents.json | 22 + .../mine_setting_modif_pay_pwd_hidden@2x.png | Bin 0 -> 440 bytes .../mine_setting_modif_pay_pwd_hidden@3x.png | Bin 0 -> 751 bytes .../Contents.json | 22 + .../mine_setting_modif_pay_pwd_show@2x.png | Bin 0 -> 323 bytes .../mine_setting_modif_pay_pwd_show@3x.png | Bin 0 -> 572 bytes .../Contents.json | 22 + .../mine_setting_pay_password_hidden@2x.png | Bin 0 -> 499 bytes .../mine_setting_pay_password_hidden@3x.png | Bin 0 -> 945 bytes .../Contents.json | 22 + .../mine_setting_pay_password_show@2x.png | Bin 0 -> 784 bytes .../mine_setting_pay_password_show@3x.png | Bin 0 -> 1445 bytes xplan-ios/Base/MVP/Api/Api.h | 17 + xplan-ios/Base/MVP/Api/Api.m | 22 + xplan-ios/Global/XPConstant.h | 2 +- xplan-ios/Global/XPConstant.m | 2 +- xplan-ios/Global/XPEnum.h | 12 + xplan-ios/Main/Login/Api/Api+Login.h | 55 ++- xplan-ios/Main/Login/Api/Api+Login.m | 25 +- .../Presenter/LoginForgetPasswordPresent.h | 4 +- .../Presenter/LoginForgetPasswordPresent.m | 2 +- .../Login/Presenter/LoginVerifCodePresent.h | 4 +- .../Login/Presenter/LoginVerifCodePresent.m | 2 +- .../XPLoginVerifBindPhonePresenter.h | 30 ++ .../XPLoginVerifBindPhonePresenter.m | 55 +++ .../Protocol/XPLoginVerifBindPhoneProtocol.h | 21 + .../View/CustomView/XPLoginBindSuccessView.h | 17 + .../View/CustomView/XPLoginBindSuccessView.m | 128 ++++++ .../View/LoginForgetPasswordViewController.m | 3 +- .../Login/View/LoginVerifCodeViewController.m | 2 +- .../XPLoginBindPhoneResultViewController.h | 16 + .../XPLoginBindPhoneResultViewController.m | 151 ++++++ .../XPLoginVerifBindPhoneViewController.h | 29 ++ .../XPLoginVerifBindPhoneViewController.m | 429 ++++++++++++++++++ xplan-ios/Main/Mine/Api/Api+Mine.h | 26 ++ xplan-ios/Main/Mine/Api/Api+Mine.m | 22 + .../Presenter/XPMineModifPayPwdPresenter.h | 21 + .../Presenter/XPMineModifPayPwdPresenter.m | 36 ++ .../Mine/Presenter/XPMinePayPwdPresenter.h | 25 + .../Mine/Presenter/XPMinePayPwdPresenter.m | 46 ++ .../XPMineResetPayPasswordPresenter.h | 20 + .../XPMineResetPayPasswordPresenter.m | 35 ++ .../Mine/Presenter/XPMineSettingPresent.m | 2 + .../Presenter/XPMineVerifIdentityPresenter.h | 26 ++ .../Presenter/XPMineVerifIdentityPresenter.m | 45 ++ .../Mine/Protocol/XPMineModifPayProtocol.h | 19 + .../Main/Mine/Protocol/XPMinePayPwdProtocol.h | 19 + .../Protocol/XPMineResetPayPasswordProtocol.h | 18 + .../Protocol/XPMineVerifIdentityProtocol.h | 19 + .../Main/Mine/View/SubViews/XPMineHeadView.m | 2 +- .../View/SubViews/XPMineModifPayPwdView.h | 19 + .../View/SubViews/XPMineModifPayPwdView.m | 113 +++++ .../View/SubViews/XPMinePayPwdInputView.h | 39 ++ .../View/SubViews/XPMinePayPwdInputView.m | 202 +++++++++ .../View/SubViews/XPMineVerifIdentityView.h | 30 ++ .../View/SubViews/XPMineVerifIdentityView.m | 127 ++++++ .../Mine/View/XPMineFeedbackViewController.m | 2 +- .../View/XPMineModifPayPwdViewController.h | 17 + .../View/XPMineModifPayPwdViewController.m | 198 ++++++++ .../Mine/View/XPMinePayPwdViewController.h | 24 + .../Mine/View/XPMinePayPwdViewController.m | 242 ++++++++++ .../View/XPMineResetPayPwdViewController.h | 16 + .../View/XPMineResetPayPwdViewController.m | 138 ++++++ .../Mine/View/XPMineSettingViewController.m | 46 +- .../View/XPMineVerifIdentityViewController.h | 17 + .../View/XPMineVerifIdentityViewController.m | 174 +++++++ .../Main/Mine/View/XPMineViewController.m | 4 + 71 files changed, 2995 insertions(+), 47 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/login_bind_phone_bg@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_show.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_show.imageset/mine_setting_modif_pay_pwd_show@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_show.imageset/mine_setting_modif_pay_pwd_show@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_hidden.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_hidden.imageset/mine_setting_pay_password_hidden@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_hidden.imageset/mine_setting_pay_password_hidden@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@3x.png create mode 100644 xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.h create mode 100644 xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.m create mode 100644 xplan-ios/Main/Login/Protocol/XPLoginVerifBindPhoneProtocol.h create mode 100644 xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.h create mode 100644 xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.m create mode 100644 xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.h create mode 100644 xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.m create mode 100644 xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.h create mode 100644 xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.m create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.h create mode 100644 xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.m create mode 100644 xplan-ios/Main/Mine/Protocol/XPMineModifPayProtocol.h create mode 100644 xplan-ios/Main/Mine/Protocol/XPMinePayPwdProtocol.h create mode 100644 xplan-ios/Main/Mine/Protocol/XPMineResetPayPasswordProtocol.h create mode 100644 xplan-ios/Main/Mine/Protocol/XPMineVerifIdentityProtocol.h create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.h create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.m create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.h create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.m create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.h create mode 100644 xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.m create mode 100644 xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.m create mode 100644 xplan-ios/Main/Mine/View/XPMinePayPwdViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPMinePayPwdViewController.m create mode 100644 xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.m create mode 100644 xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.m diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index f5a8ffcc..0eb93572 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -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 = ""; }; E82109AE26F1D83500FC3319 /* LoginBindPhonePresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginBindPhonePresent.h; sourceTree = ""; }; E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginBindPhonePresent.m; sourceTree = ""; }; + E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = ""; }; + E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhoneViewController.m; sourceTree = ""; }; + E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhonePresenter.h; sourceTree = ""; }; + E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhonePresenter.m; sourceTree = ""; }; + E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneProtocol.h; sourceTree = ""; }; + E824543B26F58C3A00BE8163 /* XPLoginBindSuccessView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginBindSuccessView.h; sourceTree = ""; }; + E824543C26F58C3A00BE8163 /* XPLoginBindSuccessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginBindSuccessView.m; sourceTree = ""; }; + E824543E26F58F9400BE8163 /* XPMinePayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdViewController.h; sourceTree = ""; }; + E824543F26F58F9400BE8163 /* XPMinePayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdViewController.m; sourceTree = ""; }; + E824544126F58FCE00BE8163 /* XPMinePayPwdInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdInputView.h; sourceTree = ""; }; + E824544226F58FCE00BE8163 /* XPMinePayPwdInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdInputView.m; sourceTree = ""; }; + E824544426F5934600BE8163 /* XPMinePayPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdPresenter.h; sourceTree = ""; }; + E824544526F5934600BE8163 /* XPMinePayPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayPwdPresenter.m; sourceTree = ""; }; + E824544726F5940600BE8163 /* XPMinePayPwdProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayPwdProtocol.h; sourceTree = ""; }; + E824544926F5BBB800BE8163 /* XPMineModifPayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdViewController.h; sourceTree = ""; }; + E824544A26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdViewController.m; sourceTree = ""; }; + E824544C26F5BC1A00BE8163 /* XPMineModifPayPwdView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdView.h; sourceTree = ""; }; + E824544D26F5BC1A00BE8163 /* XPMineModifPayPwdView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdView.m; sourceTree = ""; }; + E824544F26F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayPwdPresenter.h; sourceTree = ""; }; + E824545026F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineModifPayPwdPresenter.m; sourceTree = ""; }; + E824545226F5CE9C00BE8163 /* XPMineModifPayProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineModifPayProtocol.h; sourceTree = ""; }; + E824545426F5E51900BE8163 /* XPMineVerifIdentityViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityViewController.h; sourceTree = ""; }; + E824545526F5E51900BE8163 /* XPMineVerifIdentityViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityViewController.m; sourceTree = ""; }; + E824545726F5E65900BE8163 /* XPMineVerifIdentityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityView.h; sourceTree = ""; }; + E824545826F5E65900BE8163 /* XPMineVerifIdentityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityView.m; sourceTree = ""; }; + E824545A26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityPresenter.h; sourceTree = ""; }; + E824545B26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineVerifIdentityPresenter.m; sourceTree = ""; }; + E824545D26F5EEFD00BE8163 /* XPMineVerifIdentityProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineVerifIdentityProtocol.h; sourceTree = ""; }; + E824545F26F5F4E400BE8163 /* XPMineResetPayPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPwdViewController.h; sourceTree = ""; }; + E824546026F5F4E400BE8163 /* XPMineResetPayPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetPayPwdViewController.m; sourceTree = ""; }; + E824546226F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordPresenter.h; sourceTree = ""; }; + E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineResetPayPasswordPresenter.m; sourceTree = ""; }; + E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordProtocol.h; sourceTree = ""; }; E872308726E89BE000B90D4F /* LoginPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPhoneViewController.h; sourceTree = ""; }; E872308826E89BE000B90D4F /* LoginPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginPhoneViewController.m; sourceTree = ""; }; E872308B26E89DAA00B90D4F /* LoginInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginInputView.h; sourceTree = ""; }; @@ -307,6 +360,8 @@ E8AC723626F49957007D6E91 /* XPMineNotificaProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotificaProtocol.h; sourceTree = ""; }; E8AC723826F49AAE007D6E91 /* XPMineNotifyStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNotifyStatus.h; sourceTree = ""; }; E8AC723926F49AAE007D6E91 /* XPMineNotifyStatus.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNotifyStatus.m; sourceTree = ""; }; + E8AC723B26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginBindPhoneResultViewController.h; sourceTree = ""; }; + E8AC723C26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginBindPhoneResultViewController.m; sourceTree = ""; }; E8B825B526E9A7D8009E8E9F /* BaseObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseObject.h; sourceTree = ""; }; E8B825B626E9A7D8009E8E9F /* BaseObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseObject.m; sourceTree = ""; }; E8B825BD26E9E57D009E8E9F /* LoginTicketInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginTicketInfo.h; sourceTree = ""; }; @@ -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 = ""; @@ -566,6 +625,8 @@ E81366F526F0C0DF0076364C /* LoginFullInfoPresenter.m */, E82109AE26F1D83500FC3319 /* LoginBindPhonePresent.h */, E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */, + E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */, + E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */, ); path = Presenter; sourceTree = ""; @@ -578,6 +639,7 @@ E8CEA03E26EA3E0200644B44 /* LoginPasswordProtocol.h */, E81C279726EB39E10031E639 /* LoginForgetPasswordProtocol.h */, E81366F726F0C0F60076364C /* LoginFullInfoProtocol.h */, + E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */, ); path = Protocol; sourceTree = ""; @@ -797,6 +859,8 @@ E872309226E8D31500B90D4F /* LoginVerifCodeView.m */, E81C278E26EB314D0031E639 /* LoginForgetEditView.h */, E81C278F26EB314D0031E639 /* LoginForgetEditView.m */, + E824543B26F58C3A00BE8163 /* XPLoginBindSuccessView.h */, + E824543C26F58C3A00BE8163 /* XPLoginBindSuccessView.m */, ); path = CustomView; sourceTree = ""; @@ -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 = ""; @@ -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 = ""; @@ -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 = ""; @@ -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 = ""; @@ -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 */, diff --git a/xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/Contents.json new file mode 100644 index 00000000..68cb9f1a --- /dev/null +++ b/xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/Contents.json @@ -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 + } +} diff --git a/xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/login_bind_phone_bg@2x.png b/xplan-ios/Assets.xcassets/Login/login_bind_phone_bg.imageset/login_bind_phone_bg@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..632541c4788783bf4547e15c63a726a49f0d0ad9 GIT binary patch literal 21879 zcmbTd1ymf*)-O6Z!QFKrxVyW%I|Lg70m2}ILvVMu5G=^x?h;&syIUX-T!TLT=R4n7 z_r7=EebQ@nPj%I=w(q^Bx~n5K)a21oNKgO(0J@@rj1~X@gYkC4BO|``EHkb2z5Toc zD;T;00I0bCoG^f_93lV!fy_?Fz|BBaMaas@kr<)x}^)HBd%ZZ6g~LRvC%|K{~}CknK6a{~*p zvwL`Wuz7H^Ik|jf=M)qaWar>w=i*|0L$JDfeRi|(Wc}<)^WPL?K(1CUc3?LCjM{SS}-r7Vt)|6$?kChPvD#=i~n zzeKz0c!5FeS|C>^h>I0S*8NRPnt!wb3rV|xEZm%2bexHL$M|Adc_f}QJ|W4->JJ=!4Wf43a$sQwi(LKas4WP&Kr z>Yoq*Sp)ywZTJ7%0{=zU!xr>L^nVi<{{?e(vT^gUZ~;kve6!a7o6uu_lb`*cwEZtt z*#FO3{%h=iNb&!MztxR@n*S+SZ#Vxbd7#g4b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N;=>-zwRw(OsO4rbkD zqzE7NQ)!(FB%dnm=KH~I)+pIi9f5stP-6?Ol2a95Bp+k7>XCQp6`Sk@uj*ES0WLb# z*y`5v;wSh@Ha{ih*6vn-&F&v&MP036-zF4sUgAXj85;OP?!-sc?YXbI9JqlCR!bY2 z)n(}8xN@1&$UkV9)k8z#4~Sbn|C&bjnZ9xh{iPW-={&ur%UpExb^c-s0S%TOf1+Bu z%%1!Xeo~Nt(_Z!%psQO)#$VGGpYC<}+*x`dy|%!K$ChP|=AXFQP2cBvA=V@$r+3dpbXy-{V>)=hvds}L->_(##4tFHT<=tEx##URSZAl*;aIK_ zY|%6S11M(H^cvW!HEUl(YasbSm0dK1C7^z=m{bHR|0+W`y5xe;@B#F%2TvAX5;^`9rJ%HH(Jy$D_ycF&#)@C|<7h-}y9kh|9+rDp4< z(le?XuEV;K`eqq=U+1&heQVOKZC~`uf1M3Gx*b4cw6Du3+nY5C%4^D*_zQz-jZ5f3 zW|k*7O@@!#J$=>a28*ZsX6T6e%davoz}QNF#k>Y~G;Y+UGMo*UM1I`O62*1X+?T=ed@`KC!f>D zt}NY^Yg%8P{q1TIve!*`m^&a@*=r^_xAEJUjE-7G@bX6izD+!`=?fUh)&hhv(FuZj z_7^F-AKBe%N+mO!l-`brz?}tp_D?ohE&!rv2icaNKb&~?+qpacEb)8SQj<9|%56;) z8q@T z0ksuV#d}y$c=e0>lq*EL9zadMsYDAkvc>;SjN)%3i06MEnEIx3&pRv zV50J0>KLV~<`iDSouMIK?^xu3@jyn?fk!cPoGL`{=kA}ynIB#}Bm4?+> zJNhG8=%y?>z{O+g@CP$P@2)Je1yTJ(kqk6PlLSS*;~QU+N~YkEbMU{k p{}(BbtQ#4u_y22+eOCX_-_1<^^KsN*>Mt5qPs>=dR^9&P{{X>c2c`f3 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/Contents.json new file mode 100644 index 00000000..777e892a --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/Contents.json @@ -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 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@2x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9de7f52ceb169abedde5e6a80d94be77f0e5fc18 GIT binary patch literal 440 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ew!3-qLWqbvIR7HSKh%1o3c=6IjC;&1p0l}3k zSAgWjizt9h~qUi0og$@cC#>-m1(``e8j_xxi0basVw_VkM5B`;RK`@QH^ p*X*6MV$OZF@-ti6vvlhFvyvC;L?Yfj^#er#gQu&X%Q~loCIFPB@J9du literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_hidden.imageset/mine_setting_modif_pay_pwd_hidden@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..82abbb504b1ff39dd00edd1d6869af6130e1b9b2 GIT binary patch literal 751 zcmeAS@N?(olHy`uVBq!ia0vp^20*OE!3-o1P1NuJQcDATLR^9L(W6HX9ol#9+=a`R zuUxor@%;IV7l72oOP4NPK5^nSkOZR>XZHR#oS+Fvor57$;x^nIuNF&gkt5>hxxN-CP^&7Wt z-M)MG9{;633P6V%lmz(&Gq5t-{psm;eD#>)%eHdWU-yqMh!+!hzt{YwtnmFSb0*dm zr9}iw@tj`0Y)Wf(s*w(3Uvm@#1LH|g7sn8f<8LS3ELs&H;M%xC;F;ruj5+N`G|S7G zfByI1Eu%40$un~5@i*+NH(bvQGk5=WTHm#DLiqH@?LXAtUjFm4MXvAr@0Bs1&iA~j zc+vi}|Lv*y6`y}v>Qqc;jQS?G;rzU5b!wXGlM7!SR**VX`{P4v5R=2o3wpH~1|d}` z>-4y1OujPHr~B^?*ZRM9`|USr@W=h_mO7tj=kT!jx$OUYpR$r>><$pIwrk8R|GDzP z$=g%?r}A^lrzWS|+jqE{^TdWjpH@EJEGf{n_Ugs^k}{%iwdGIMy0zZ3Sl{&bS>9Sk z4X#|5flNr;4r$6p^$a41Iddv79cl-n*ey^}=n6DVQt!BrUmFZU+atgB-tl_ko zdG&Xt;GU}`_oNusujWhKryTc!S3cp&lgEG7KUurgnQ88qTkW&#CfWKsOw=+JvN-Z@ z;kV4Y{-x&xyfag$PIF$7_i(ZKyC<%ve}DFR8FO`N?REFQ`;H1x+kTv@dsX?iJJZ17 zSk%7r-T#)JzihTa?B3?df*Pge@i+U(d*zdqIa_r{`q97}I$POI9)I@PYL zwWsre%dE<+yDx8hm-AA1ow)mdlTA%O6l&+6jhrUet@HP3_$T>kTK3Fyx2YTjCI|*k LS3j3^P6}9hhqqOzh&*55 zBzJB0tePOZkg|D8fol3aT^vI+&flFF$=7Va{oT0x{L3)c@Uk0EU)ic}=g~Hue78+qf?q~vPY1t2 zoWzW4E-t@kA4qg&JHg+5npk>u|c)Vz6G8N h&pv(WTJ6SPO#9dKzt(an^8-4K!PC{xWt~$(695;Xn^FJ( literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_show.imageset/mine_setting_modif_pay_pwd_show@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_modif_pay_pwd_show.imageset/mine_setting_modif_pay_pwd_show@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..320b3a6109d7e1f4f775d1b192147524ca2120bf GIT binary patch literal 572 zcmeAS@N?(olHy`uVBq!ia0vp^20*OE!3-o1P1NuJQoR8_A+A9B;>Alqbm`KS|Ns93 z8OM(wKX~xqrAwE=f|oB}zH;&6MIZ%K0TBU8oj-r^!UYJraOKKXp!fw4xOnc|h4bgn zgGGR{m(HIDi(UkZpF4I8q6}yg$S9!f&Ye4f?5kI=-MDe%)~(yuu3gvMwJsLq%90?z zV1`%wB$MMRfw{m`>nW)gk?OSH1bJthaOkrSP zH1TwC4DmSrHY9w~VFe!38%Oq*TiZtS{`hx1n(< zY0UTkZ&*ER>qRvMl^ZU)tHbLL9RGVwe2#yVh4{ZR`+rRK&lXNd-|*90@Y(VC9h*yL zF&cY6{MjNu(E^TP$(c!;??h?mJSRy@7>&vC1nWr;r;*BH9EVt=-+-5`4fUXQdvihOReP zUdhS%rVr-Usl7Y4D*9-ovcUdLYq;Jiyi3vv;ZGKS+px67S1LNJ| oK6NThXDB+mKQ9ZHI%QV^GH z@6W~2%^%)I&kcV^$46-+e@!!QiPFbu;m3==o)oRa2>;wg^Jn)oH41x<=e zDa~xS4M=mYl+6)j_C~+cU28VdNz&?k>cT^Wf{fZQaW-)s$9ANPlOKbIr`Z;vkTP9# z&59GdiK1*ud=pwTqold@^~hr(Y#&Io=bNIO=rp&JBpDPHXsw4xV+U(|9cYNqD0MWU zlzE3?$wr=O?vPG*rCv`)qbTY}pvG83gQp@SQDl}% zdf@)Y4=wGTKL(G0CDa-~BP#SkGh6=ZBZojEivl#T_vS8y19EBX4BGGz ze+{li_h!QXS}hx{p6>~&PZ(g#e?vXAfo$Hd@sj@8baSvq^a^>N_i1H!i)%40t7D8| p4mrrh8o@9O!!Qi<@A=pW2LN=-uBE?T5QYE%002ovPDHLkV1g8--4p-- literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_hidden.imageset/mine_setting_pay_password_hidden@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_hidden.imageset/mine_setting_pay_password_hidden@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a55dea5b40d55df392af25b0aba5a0c1538bbe1e GIT binary patch literal 945 zcmV;i15W&jP)81t%5 z^{DE`w#`j!+vpQ#y6^wu>3{nB>apsaGpDPo>lUqIWgrsNKLh+ZRo^M4G~NHDfn4N- z`qO263XKHxR-(3{8)W87LgQf|zW*i6;ysM_b~yg{4$=M|B59t#GrU<-8Z%!Tagb_! zlJD5`IpD{RHSH>jVlE(hIpGY|_{uD91p524qeNt?iEwYe`R1wl%0_7n;I{$kt4VP{ zqJ6~`K1Tx$x^`Y5Zl%ZxL*sL(zX*+F<_D|#hL>Gt3y6F_6;1o;=ibIZ|4_iM0pcZ~ zwmU0fr3PwgoIz&3XLSw@CBCDUMw!!Yr=O78oX#e0bH4r}{+i^y!h;F5z}HTkcZ z_0}1>L6={iX60j4Sq{}t8$8jQ`8IXSox$HX^|$%hFrfYpG(MKGDCW8gH0-SERpC^-UKSWIE&QDyE-Zms=p6KbT7{Nc6}}4b)N;zH;Lh zMb)b}H%l9d$P6``@YGO$p?0=N+OcA$^mnYwB?hqu^T|nWYM_>}$?a;jdTZA1Ng7|Z z+wIv0^Z7UauXfKVvBpO2GK(WJ9dUE62I4o>)evj+4AT1fW0nrf&$c+Uu7+5nXwdF8 zANF05SY?vKAJw-Ru}01y9z=m?mGM5{UzYKXj`vTx`J$Vr&)0D9`YFr>Ygnt%A=cO^ zUfphY79eeB>IazkmLf9qL^aG|E^Amzj33&A0~!DT0E9vIPi>BGzyJUM001aD^*9vM THo-0d00000NkvXXu0mjf-QLo3 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/Contents.json new file mode 100644 index 00000000..01b358e7 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/Contents.json @@ -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 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@2x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..95fe661f5f927cfc9abc0a1c67f2f7089a0f5e98 GIT binary patch literal 784 zcmV+r1MmEaP)cQgl@U9IpqTs#v29zs-LGdc-4iFp*tTt(U!1;~p#$BYM%;0nJc6s?#N`W+O63P#*nq7ZCBJ%gxUArE2T1twgDu$1 zDVM2CTwZV`Lh77FYP1N-){NPu8DqKe!!@4aotN&X=XRBhk{7}$LtI{R`GQw0a{6uA zvgQAHHXtL!n*Pvn*~BHRkrDE?ZRaB{_qmXlmSq)B)*f`A>#~V`Sj+bf5UJVO$*Y;~ z-o5)LRh!TiBxmV%v6ipoIhRd{A>=t^oY*7hTCyJ%nMjR-{Rd&%R= zLoS&O0E|VOx%`zor@sL%cWbF~aV&YbjYeWn!fTOQsp)R>BY3xI?lU);4WQauqz0~B zDT^}33dGWdZQnOwSxyg)&?_ro*G|-hG+p7TN0GX)?Yj%1@DP`W^#JqgUr?OUAg%8 z845-_BvN?b*A}hmBS>9zv2!y+Lyn#;)D4d;b4my~4E`&`+LCkU?#_iDt~s|`eI9_$ zc<5eZOx4V>F_K6g@@t?$2O0=C+0`K%&@>O~~yeg3z~ozG;S!N2hg??SYuCuGxK(ZImKz`(%3z~DV;0KVaf*!OV& O0000r literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_pay_password_show.imageset/mine_setting_pay_password_show@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9ef1c45c56be2c7ece3e20b71c808e28210b9513 GIT binary patch literal 1445 zcmV;W1zP%vP)x6NPDc@VjHDq=Z zV_AX8R#Sj65tzU(NTaM-vu3?SBC$QQf0W71!^CPsfDIkc1)T+BAZ}T96tgRdWf>+? zy8<21<&P=|;~=0i={ROxg$ZOyRTJZUx5hH3(#f!!!{mkvX>)7+ z-Nr=67Zv@y%hzA~O(6KWB>o%zhcOt7cVbCtbm%ULIe<&v8OV~qUBpjHH31==A>`^2 z>DAWSozum}Sdms&5k>WYkxB2*DO_N?)k08D0gJ#++&v>M#NF=qx6(GOE3f5UApuOP6Y1G+*=f z`ksipGu@J|7g)VEf(ES>juJcDWu(!xGw^3`=X-sGFLI~wj@D1nXJaxbTAQw znO&#k+eKIBP0fwAf2LdNL30i30=Je9SAzlht1 zN&5tnvPDGEEyy`CN)(e+0EAp?WAqq|O`V%z(W1MUlILbZu4id!#a`J=rq>grm#0|y z3D&yv(!qgupvc9n?U;0NEc0S%gKg#G|D}`MK^K!w3|?9}x;QtNRdPQvyOjZAeXLC! zQQI8gVa#qofWt~5|8-7VI&8Ef0(5|2{}S>SAtu#)EJV!F%Z1(Gkmul}G$z_3r=3z} zy&!m#hLD>=q>tgQR8xAr_nTODPl>pxsTz$UdRAVvgDkrTk=}=mgl!nLC@!{#Rj0C8 zr%tpvFoaz(Q_8N%{G8UM12vf^|1N@TD$y}rL?6zr zMFMWm=%lhPNI3zlJo{P9Zm_UxWGTA+_hP=?8D$a(er_2zAFcJb3%MrDIz+_HuDtEz z=HapmjJ$0*i|9SfZb~>yt`%90B0Wkd1=3yB(~#r^Dtt98emRl0LIkeK z;kd`ebZvWZOaK4?fH27ZsjaaC7ytkO06@|KH_&;WYfzlP00000NkvXXu0mjfXpOfF literal 0 HcmV?d00001 diff --git a/xplan-ios/Base/MVP/Api/Api.h b/xplan-ios/Base/MVP/Api/Api.h index ce9bed86..935b36a2 100644 --- a/xplan-ios/Base/MVP/Api/Api.h +++ b/xplan-ios/Base/MVP/Api/Api.h @@ -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 diff --git a/xplan-ios/Base/MVP/Api/Api.m b/xplan-ios/Base/MVP/Api/Api.m index 856abddc..92c227f7 100644 --- a/xplan-ios/Base/MVP/Api/Api.m +++ b/xplan-ios/Base/MVP/Api/Api.m @@ -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 diff --git a/xplan-ios/Global/XPConstant.h b/xplan-ios/Global/XPConstant.h index 336334d4..ec8bdcb8 100644 --- a/xplan-ios/Global/XPConstant.h +++ b/xplan-ios/Global/XPConstant.h @@ -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 加密的 diff --git a/xplan-ios/Global/XPConstant.m b/xplan-ios/Global/XPConstant.m index bded59f4..a045f847 100644 --- a/xplan-ios/Global/XPConstant.m +++ b/xplan-ios/Global/XPConstant.m @@ -11,7 +11,7 @@ NSString * const kUMengAppKey = @"5ff6bc6dadb42d5826a1cbc4"; NSString * const kChannelKey = @"App Store"; - +NSString * const kWeChatNumber = @"yinyoucc"; ///在里面进行判断当前环境是什么 NSString * const KeyWithType(KeyType type) { diff --git a/xplan-ios/Global/XPEnum.h b/xplan-ios/Global/XPEnum.h index 2e3c7881..cd9fc2f4 100644 --- a/xplan-ios/Global/XPEnum.h +++ b/xplan-ios/Global/XPEnum.h @@ -14,4 +14,16 @@ typedef NS_ENUM(NSUInteger, ThirdLoginType) { ThirdLoginType_Apple = 5,///苹果登录 }; +/// @param type 类型 业务类型,必填,1注册,2登录,3重设密码,4绑定手机,5绑定xczAccount,6重设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 */ diff --git a/xplan-ios/Main/Login/Api/Api+Login.h b/xplan-ios/Main/Login/Api/Api+Login.h index 44473d42..28f129eb 100644 --- a/xplan-ios/Main/Login/Api/Api+Login.h +++ b/xplan-ios/Main/Login/Api/Api+Login.h @@ -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绑定xczAccount,6重设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 diff --git a/xplan-ios/Main/Login/Api/Api+Login.m b/xplan-ios/Main/Login/Api/Api+Login.m index 02a9972d..0f188f50 100644 --- a/xplan-ios/Main/Login/Api/Api+Login.m +++ b/xplan-ios/Main/Login/Api/Api+Login.m @@ -13,15 +13,6 @@ [self makeRequest:@"acc/oneclick/login" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, token, nil]; } - -/// 获取手机号的验证码 -/// @param completion 请求完成 -/// @param mobile 手机号 -/// @param type 类型 业务类型,必填,1注册,2登录,3重设密码,4绑定手机,5绑定xczAccount,6重设xcz密码,7解绑手机 -+ (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 diff --git a/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.h b/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.h index 9f4487c2..806bc302 100644 --- a/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.h +++ b/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.h @@ -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 手机号 diff --git a/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.m b/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.m index 6411ab67..02fd31de 100644 --- a/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.m +++ b/xplan-ios/Main/Login/Presenter/LoginForgetPasswordPresent.m @@ -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) { diff --git a/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.h b/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.h index bf80eda6..6dde2311 100644 --- a/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.h +++ b/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.h @@ -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 手机号 diff --git a/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.m b/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.m index 6970b5d4..b11895c7 100644 --- a/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.m +++ b/xplan-ios/Main/Login/Presenter/LoginVerifCodePresent.m @@ -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) { diff --git a/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.h b/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.h new file mode 100644 index 00000000..aa47e0a4 --- /dev/null +++ b/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.h @@ -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 diff --git a/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.m b/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.m new file mode 100644 index 00000000..569f5b85 --- /dev/null +++ b/xplan-ios/Main/Login/Presenter/XPLoginVerifBindPhonePresenter.m @@ -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 diff --git a/xplan-ios/Main/Login/Protocol/XPLoginVerifBindPhoneProtocol.h b/xplan-ios/Main/Login/Protocol/XPLoginVerifBindPhoneProtocol.h new file mode 100644 index 00000000..87de2b7a --- /dev/null +++ b/xplan-ios/Main/Login/Protocol/XPLoginVerifBindPhoneProtocol.h @@ -0,0 +1,21 @@ +// +// XPLoginVerifBindPhoneProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPLoginVerifBindPhoneProtocol +///请求手机号的验证码成功 +- (void)phoneSmsCodeSuccess; +///绑定手机号成功 +- (void)bindMoblieCodeWithMoblieSuccess; +///验证绑定手机成功 +- (void)checkMoblieCodeWithMoblieSuccess; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.h b/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.h new file mode 100644 index 00000000..048dfb33 --- /dev/null +++ b/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.h @@ -0,0 +1,17 @@ +// +// XPLoginBindSuccessView.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +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 diff --git a/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.m b/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.m new file mode 100644 index 00000000..557efc2b --- /dev/null +++ b/xplan-ios/Main/Login/View/CustomView/XPLoginBindSuccessView.m @@ -0,0 +1,128 @@ +// +// XPLoginBindSuccessView.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPLoginBindSuccessView.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Login/View/LoginForgetPasswordViewController.m b/xplan-ios/Main/Login/View/LoginForgetPasswordViewController.m index 82df50ca..a586ead8 100644 --- a/xplan-ios/Main/Login/View/LoginForgetPasswordViewController.m +++ b/xplan-ios/Main/Login/View/LoginForgetPasswordViewController.m @@ -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]; } }]; diff --git a/xplan-ios/Main/Login/View/LoginVerifCodeViewController.m b/xplan-ios/Main/Login/View/LoginVerifCodeViewController.m index a6706cc5..d2bc562b 100644 --- a/xplan-ios/Main/Login/View/LoginVerifCodeViewController.m +++ b/xplan-ios/Main/Login/View/LoginVerifCodeViewController.m @@ -92,7 +92,7 @@ - (void)httpRequestPhoneSmsCode { - [self.presenter phoneSmsCode:self.phone type:1]; + [self.presenter phoneSmsCode:self.phone type:GetSmsType_Regist]; } - (void)initEvents { diff --git a/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.h b/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.h new file mode 100644 index 00000000..db974014 --- /dev/null +++ b/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.h @@ -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 diff --git a/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.m b/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.m new file mode 100644 index 00000000..98f5cd50 --- /dev/null +++ b/xplan-ios/Main/Login/View/XPLoginBindPhoneResultViewController.m @@ -0,0 +1,151 @@ +// +// XPLoginBindPhoneResultViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/17. +// + +#import "XPLoginBindPhoneResultViewController.h" +///Third +#import +#import +///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 diff --git a/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.h b/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.h new file mode 100644 index 00000000..ab0e54f5 --- /dev/null +++ b/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.h @@ -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 diff --git a/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.m b/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.m new file mode 100644 index 00000000..0b352969 --- /dev/null +++ b/xplan-ios/Main/Login/View/XPLoginVerifBindPhoneViewController.m @@ -0,0 +1,429 @@ +// +// XPLoginVerifBindPhoneViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPLoginVerifBindPhoneViewController.h" +///Third +#import +#import +///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 () +@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 diff --git a/xplan-ios/Main/Mine/Api/Api+Mine.h b/xplan-ios/Main/Mine/Api/Api+Mine.h index cbec4e58..816b7c77 100644 --- a/xplan-ios/Main/Mine/Api/Api+Mine.h +++ b/xplan-ios/Main/Mine/Api/Api+Mine.h @@ -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 diff --git a/xplan-ios/Main/Mine/Api/Api+Mine.m b/xplan-ios/Main/Mine/Api/Api+Mine.m index 79b87200..48b01063 100644 --- a/xplan-ios/Main/Mine/Api/Api+Mine.m +++ b/xplan-ios/Main/Mine/Api/Api+Mine.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.h new file mode 100644 index 00000000..9ad2e640 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.m new file mode 100644 index 00000000..7f1c858f --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineModifPayPwdPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.h new file mode 100644 index 00000000..f6c510b0 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.m new file mode 100644 index 00000000..a26da252 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMinePayPwdPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.h new file mode 100644 index 00000000..599416cc --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.m new file mode 100644 index 00000000..1de83fe7 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineResetPayPasswordPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m b/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m index 3ccd72a5..e0f8aa2f 100644 --- a/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m +++ b/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m @@ -95,4 +95,6 @@ }] uid:uid]; } + + @end diff --git a/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.h b/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.h new file mode 100644 index 00000000..73119c57 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.h @@ -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 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.m b/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.m new file mode 100644 index 00000000..b3d71822 --- /dev/null +++ b/xplan-ios/Main/Mine/Presenter/XPMineVerifIdentityPresenter.m @@ -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 diff --git a/xplan-ios/Main/Mine/Protocol/XPMineModifPayProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMineModifPayProtocol.h new file mode 100644 index 00000000..5e09c2c0 --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMineModifPayProtocol.h @@ -0,0 +1,19 @@ +// +// XPMineModifPayProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMineModifPayProtocol + +///修改支付密码成功 +- (void)modifPayPasswordSuccess; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/Protocol/XPMinePayPwdProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMinePayPwdProtocol.h new file mode 100644 index 00000000..c6fb31c3 --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMinePayPwdProtocol.h @@ -0,0 +1,19 @@ +// +// XPMInePayPwdProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMinePayPwdProtocol +///请求手机号的验证码成功 +- (void)phoneSmsCodeSuccess; +///设置支付密码成功 +- (void)setPayPasswordSuccess; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/Protocol/XPMineResetPayPasswordProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMineResetPayPasswordProtocol.h new file mode 100644 index 00000000..81cfde45 --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMineResetPayPasswordProtocol.h @@ -0,0 +1,18 @@ +// +// XPMineResetPayPasswordProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMineResetPayPasswordProtocol +///重置支付密码 +- (void)resetPayPasswordSuccess; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/Protocol/XPMineVerifIdentityProtocol.h b/xplan-ios/Main/Mine/Protocol/XPMineVerifIdentityProtocol.h new file mode 100644 index 00000000..2111e616 --- /dev/null +++ b/xplan-ios/Main/Mine/Protocol/XPMineVerifIdentityProtocol.h @@ -0,0 +1,19 @@ +// +// XPMineVerifIdentityProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPMineVerifIdentityProtocol +///请求手机号的验证码成功 +- (void)phoneSmsCodeSuccess; +///验证绑定手机成功 +- (void)checkMoblieCodeWithMoblieSuccess; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m index 9d29f767..ddde4bec 100644 --- a/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineHeadView.m @@ -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); }]; } diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.h b/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.h new file mode 100644 index 00000000..d44d9868 --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.h @@ -0,0 +1,19 @@ +// +// XPMineModifPayPwdView.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPMineModifPayPwdView : UIView +///输入框 +@property (nonatomic,strong, readonly) UITextField *contentTextField; +///占位 +@property (nonatomic,copy) NSString *placeholder; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.m new file mode 100644 index 00000000..3c424b64 --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineModifPayPwdView.m @@ -0,0 +1,113 @@ +// +// XPMineModifPayPwdView.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMineModifPayPwdView.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.h b/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.h new file mode 100644 index 00000000..8fda867d --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.h @@ -0,0 +1,39 @@ +// +// XPMinePayPwdInputView.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.m b/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.m new file mode 100644 index 00000000..db1fd2d8 --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMinePayPwdInputView.m @@ -0,0 +1,202 @@ +// +// XPMinePayPwdInputView.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMinePayPwdInputView.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.h b/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.h new file mode 100644 index 00000000..83e4b872 --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.h @@ -0,0 +1,30 @@ +// +// XPMineVerifIdentityView.h +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import + +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 diff --git a/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.m b/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.m new file mode 100644 index 00000000..6b7c554d --- /dev/null +++ b/xplan-ios/Main/Mine/View/SubViews/XPMineVerifIdentityView.m @@ -0,0 +1,127 @@ +// +// XPMineVerifIdentityView.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMineVerifIdentityView.h" +///Third +#import +///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 diff --git a/xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m b/xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m index b9cbf274..824ee4ec 100644 --- a/xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineFeedbackViewController.m @@ -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) { diff --git a/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.h b/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.h new file mode 100644 index 00000000..85077eab --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.m b/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.m new file mode 100644 index 00000000..ffee664b --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineModifPayPwdViewController.m @@ -0,0 +1,198 @@ +// +// XPMineModifPayPwdViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMineModifPayPwdViewController.h" +///Third +#import +#import +///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 () +///容器 +@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 diff --git a/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.h b/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.h new file mode 100644 index 00000000..fa1a6475 --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.m b/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.m new file mode 100644 index 00000000..e7fd7072 --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMinePayPwdViewController.m @@ -0,0 +1,242 @@ +// +// XPMinePayPwdViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMinePayPwdViewController.h" +///Third +#import +#import +///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 () +///设置支付密码 +@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 *)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 diff --git a/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.h b/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.h new file mode 100644 index 00000000..f4d43bf9 --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.m b/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.m new file mode 100644 index 00000000..96511cbb --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineResetPayPwdViewController.m @@ -0,0 +1,138 @@ +// +// XPMineResetPayPwdViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// 重置支付密码 + +#import "XPMineResetPayPwdViewController.h" +///Third +#import +#import +///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 () +///容器 +@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 diff --git a/xplan-ios/Main/Mine/View/XPMineSettingViewController.m b/xplan-ios/Main/Mine/View/XPMineSettingViewController.m index 2b7b832a..ebe61ee0 100644 --- a/xplan-ios/Main/Mine/View/XPMineSettingViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineSettingViewController.m @@ -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 () /// @@ -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]; } diff --git a/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.h b/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.h new file mode 100644 index 00000000..1ba9063c --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.h @@ -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 diff --git a/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.m b/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.m new file mode 100644 index 00000000..40c5ebb0 --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPMineVerifIdentityViewController.m @@ -0,0 +1,174 @@ +// +// XPMineVerifIdentityViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/9/18. +// + +#import "XPMineVerifIdentityViewController.h" +///Third +#import +#import +///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 () +///容器 +@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 diff --git a/xplan-ios/Main/Mine/View/XPMineViewController.m b/xplan-ios/Main/Mine/View/XPMineViewController.m index 4674146b..af01dbfe 100644 --- a/xplan-ios/Main/Mine/View/XPMineViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineViewController.m @@ -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