From e64e011d8f25be1c14467c899a200480487a7bcf Mon Sep 17 00:00:00 2001 From: lianxiang <13052344590@163.com> Date: Fri, 31 Aug 2018 18:23:25 +0800 Subject: [PATCH] add files --- GIGA.xcodeproj/project.pbxproj | 10 +- .../login/btn_meaasag.imageset/Contents.json | 22 +++ .../btn_meaasag.imageset/btn_meaasag@2x.png | Bin 0 -> 1397 bytes .../btn_meaasag.imageset/btn_meaasag@3x.png | Bin 0 -> 2724 bytes .../login/btn_right.imageset/Contents.json | 13 ++ .../login/btn_right.imageset/btn_right.png | Bin 0 -> 410 bytes .../login/btn_turndown.imageset/Contents.json | 13 ++ .../btn_turndown.imageset/btn_turndown.png | Bin 0 -> 386 bytes .../login/ic_note.imageset/Contents.json | 22 +++ .../login/ic_note.imageset/ic_note@2x.png | Bin 0 -> 912 bytes .../login/ic_note.imageset/ic_note@3x.png | Bin 0 -> 1460 bytes GIGA/Category/UINavigationBar+Custom.m | 6 +- .../Common/BaseVC/GiGaBaseNavViewController.m | 1 + GIGA/Common/BaseVC/GiGaBaseViewController.m | 23 ++- .../GiGaNavTitileView/GiGaNavTitileView.m | 4 +- GIGA/Common/GiGaUserDB/GiGaUserDefault.m | 1 + .../Controller/GiGaRegistViewController.h | 4 +- .../Controller/GiGaRegistViewController.m | 36 +++- .../Controller/GiGaRegistViewController.xib | 155 +++++++++--------- .../LogIn/Controller/GiGaUserLoginVC.m | 43 ++++- .../LogIn/Controller/GiGaUserLoginVC.xib | 67 ++++---- .../LogIn/Controller/PassWordResetVC.h | 4 +- .../LogIn/Controller/PassWordResetVC.m | 152 ++++++++++++++--- .../LogIn/Controller/PassWordResetVC.xib | 122 +++++++------- GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m | 12 -- .../Controller/GiGaMaskTaskViewController.m | 42 +++-- 26 files changed, 496 insertions(+), 256 deletions(-) create mode 100644 GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png create mode 100644 GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@3x.png create mode 100644 GIGA/Assets.xcassets/login/btn_right.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/login/btn_right.imageset/btn_right.png create mode 100644 GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png create mode 100644 GIGA/Assets.xcassets/login/ic_note.imageset/Contents.json create mode 100644 GIGA/Assets.xcassets/login/ic_note.imageset/ic_note@2x.png create mode 100644 GIGA/Assets.xcassets/login/ic_note.imageset/ic_note@3x.png diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index 1ff3679..b7831d7 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -1338,7 +1338,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = GIGA/GIGA.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = YYP376WR4X; GCC_PREFIX_HEADER = "$(SRCROOT)//GIGA/GIGA.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1355,8 +1355,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "f3b84b1a-7ac9-46d1-bd63-b997256cf85b"; - PROVISIONING_PROFILE_SPECIFIER = jijiaDevelopmentProfile; + PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE_SPECIFIER = ""; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -1368,8 +1368,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = GIGA/GIGA.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = YYP376WR4X; GCC_PREFIX_HEADER = "$(SRCROOT)//GIGA/GIGA.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", diff --git a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json new file mode 100644 index 0000000..c454cc3 --- /dev/null +++ b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "btn_meaasag@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "btn_meaasag@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e809918eb9859a79c113d50caafa92d667ec7f6b GIT binary patch literal 1397 zcmV-*1&aEKP)Px)FG)l}RCodHok4FCM-<2BjSYb~YMLB~l?zgmUXi!}hamM(BqRg}B=`;>k(LAf z5bdEYNbnt~ltWM@BzmYs4}}X7S3)E%!Qqf75C;xymjIh?V}gP z>4JCi+l{fQXCk7#ejVwh;@zd!--y<)IVV>PvT`pzSZ9AIU~pBO(>ayGuQOwlzjyns zy8`Tf<<+^m>JNtV`S?M@#iMRwpyW;*8E_?Ebftp5tUMxJxsL8w{!a>gwl1fd)LgZ0 zFDu`D-f#;WRkvE(Ouv!+N1ql%zQ0-i>aTQXhmBoPaDVB|L_OK~(ZIS2e}jdho*EpM z$$=p^YJkxWt^&&j*z1io_i}wz*Xy;wi~X4`_<=h&$4)MEy7G>Ih3+s(9;(xkqu%T3 z!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@2RS*zVY4SLhH)VOuey}m9-=vO9E(p zGO?DpHtDw;GhZXuMEq07?-#PwpBlO9w7X=q{DS!tn(#tncK)iVM~u721XjP~d3ED$ zeP1jU=9eQvnQ~!y;_aFX8#TS>&3!gztVpv3VWkf{0^sgu8Hz8u^6P@O?R{Bxk{*zk zUAL`e-E*#*vA%Ded}cqVJbis|Sgs%MPQ3owg#r)~b zZCV7sVHUZXCHAp>meY8PTc^ts(=w~bhvqE#{E5&IwX+?^(ef+fa^ezIdsoY{VO@{V zfLBqjJl}Riu1O){MYP28Bt@iO%V3r2(JW8K+jiO;i;{)`vpVZ z#!nj0B&>b0Nut1G!lRq$S-VX8Ceb33#?jF~5L=(hYOj6k=$E)uQskPx$R7pfZR45gllD|s>Q4GiPeVpi3sVF!)RToiE*W&JCmnw*(dj$(l{tphVT^)50 z7hT*-*9z*^`WFbI#r7QP#pK-&U*!Zb!@ayDpCtDZkRuzN_S}0gsEDaV#0BeObP04b z<>%_n#r5YT9Eq~_*eWCBGiJ^wHunV3V}t#><>HmvEvOKMd`Zk{A{R<^fXQG-VQ72( zV9@=oQVK;?J_+bg`nd%&2!ew@K|ljz{=CNOJD8Ao%gvgl%l|d7GI1CVgIeq_ne_Ft z2(bxtYN3bVoS3$wFfIrfi3C(YI8N?*#!xjJfuaaQIwuk7eK+sT)QrKA-VIQfN>#r9 zxcIK59uZ+Y9j-W5BQ%@ak*ix@yftbcS+UF|Cp<~q_0J{$0=tKr>95Ju!2kdN07*qoM6N<$ Ef-Z)(;Q#;t literal 0 HcmV?d00001 diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json new file mode 100644 index 0000000..f1a2ace --- /dev/null +++ b/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "btn_turndown.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png new file mode 100644 index 0000000000000000000000000000000000000000..194482a7ce6ef33e72003c3c85e2be88f2c26d8e GIT binary patch literal 386 zcmV-|0e$|7P)Px$JV``BR45gllD}%hKn%ux=ksDiw~U$62Pg(leSt2`k_0+;PoafOd5b1pJGMjV zQZLyv8vF#w6Ld2e4F1>eyZDM@+!7)XvZVW+bh3oik~oeBMN!P_x*j7uVoC_Hg9(*V zE8q9O8Ka1Uv8*VHCRJ6v!oM)Fj!mSL_dyVRGOj^FsPX~*y{H3e7u9R%jIdyPd7iVK zzbduwDB+}z<6KI->ERRzm0oPy9`Y>bpwQlJ`^vs=LU`X}S(b0ib9fR~Pp=PXV(S(( zZDJ#WT9BMWm&R}G8tpwbl?-$^k2W|MmcMgd_Zj|zJ}y}i!Y_JYfzM=RF1 gPx&N=ZaPR7ef&S50UWK@^_ZOu1`Gb-!Gnr-1)+FQ zY)~&A+FJ`+Jn2EL9=sH6M9rol#Ri4qp;+xjs6Pj#g%~9*&CibC3p=){Hc8vWdgy~N zGjHa7@0)Ml&Sp8YEEEd02_d>TV{Wu{(qGP&a~>0njiT-Ldc9G~h5U?#g2D5cxP`7l z<8?3-L@s!JzS|ti>=&j<>{KEGwo^=q@V_7>IB!HQ-O82WiqdAo@mz)@ONJ&eZUWmx zRdu!B?RNjP7MHwPV#FryF|%lQD39R!<6YuspNG6B@r!;z7ZEsFzJ+aC@F56>nN z6CiUH7?Ml?L>?0+aaky0jG)G7Q*-lP6w(bWN@W)@b}E@nzDKQ{rSWPEu{#XI7&I9h zLVSyb@dOF!?BP7YJD%hr=-u#Z*FLEAI_nmq0lT_q1cT2ATm~0v$HvAg zpzsyMzC+UEw4OE!+@8An`c~u_T#E4rA-TZg@x0Y^y$#2B5x#`wKLqdz?6wnvE*nd0 zL0pT+V&f>Ilm8f=~mJ9YE2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voc@3YQHS0^H~0%gcwR`l2XKCX@RC)QA_v$?|Ip-ekYQeZ?ENuNbv6v%$f^ zHPh+zyEtV(Z^oJX+Cl=nR(}mwzGzlb87FgGI`OnDw?iG+T)<{rA_+{8AH(%VXYREH zUje)E!K?*_#+?BfS~V0M-0mFMiXea#ebMYDMQ&Zvr%imnZHJ=dm2puoHWLtb;y_#o z8n#nm!sVq8AJukZ9kyduC_>8DV}%WFUoH2q0W7N_+C O0000 - -@interface GiGaRegistViewController : UIViewController +#import "GiGaBaseViewController.h" +@interface GiGaRegistViewController : GiGaBaseViewController @end diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m index 1b71b98..3c53419 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m @@ -33,13 +33,15 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"注册"; - _time = 60; + //self.title = @"注册"; + [self addNavTitile:@"注册"]; + _time = 60; // Do any additional setup after loading the view from its nib. [self confirmUI]; [self.sendCodeBtn addTarget:self action:@selector(sendCodeBtnAction:) forControlEvents:UIControlEventTouchUpInside]; [self.registBtn addTarget:self action:@selector(registBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + [self.checkBtn addTarget:self action:@selector(checkBtnAction:) forControlEvents:UIControlEventTouchUpInside]; } -(void)dealloc{ @@ -50,6 +52,7 @@ } } + -(void)sendCodeBtnAction:(UIButton *)btn{ if (self.phoneNumberTextField.text == nil) { @@ -74,7 +77,7 @@ if (self->_time==0) { [self.sendCodeBtn setTitle:@"发送短信" forState:UIControlStateNormal]; - [btn setBackgroundColor:GIGAUIColorFromRGBA(0x28b9ff)]; + self->_time =60; btn.userInteractionEnabled = YES; } @@ -106,6 +109,7 @@ -(void)confirmUI{ self.useragreementLabel.highlightedTextColor = [UIColor lightGrayColor]; + self.useragreementLabel.textColor = GIGAUIColorFromRGBA(0x919191); self.useragreementLabel.delegate = self; self.useragreementLabel.enabledTextCheckingTypes= NSTextCheckingTypePhoneNumber|NSTextCheckingTypeAddress|NSTextCheckingTypeLink; self.useragreementLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:(NSString *)kCTUnderlineStyleAttributeName]; @@ -114,13 +118,13 @@ NSString *text = @"已阅读并同意《用户服务协议》"; [self.useragreementLabel setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^NSMutableAttributedString *(NSMutableAttributedString *mutableAttributedString) { NSRange fontRange = [[mutableAttributedString string] rangeOfString:@"用户服务协议" options:NSCaseInsensitiveSearch]; - UIFont* sysFont = [UIFont systemFontOfSize:15]; + UIFont* sysFont = [UIFont fontWithName:@"PingFangSC-Semibold" size:10.f]; CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)sysFont.fontName, sysFont.pointSize, NULL); if (font) { [mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font range:fontRange]; - [mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[[UIColor greenColor] CGColor] range:fontRange]; + [mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[[UIColor colorWithRed:0/255.0 green:222/255.0 blue:189/255.0 alpha:1/1.0] CGColor] range:fontRange]; } return mutableAttributedString; @@ -131,6 +135,9 @@ @"SourceName":@"useragreement" } withRange:fontRange]; + self.registBtn.layer.masksToBounds = YES; + self.registBtn.layer.cornerRadius = self.registBtn.frame.size.height / 2; + } #pragma mark - TTTAttributedLabelDelegate @@ -188,10 +195,8 @@ btn.userInteractionEnabled = YES; GILog(@"注册->%@",result.message); if (result.code == 0) { - - NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); + NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); - }else if (result.code == GiGAErrorCode_USER_EXIST){ GIGA_ShowToast(@"用户已存在"); NC_POST_NAME_OBJECT(kUserRegistSucccess,self.phoneNumberTextField.text); @@ -203,6 +208,21 @@ } +-(void)checkBtnAction:(UIButton *)btn{ + btn.selected = !btn.selected; + if (btn.selected) { + [btn setImage:[UIImage imageNamed:@"btn_turndown"] forState:UIControlStateSelected]; + + [self.registBtn setBackgroundColor:[UIColor lightGrayColor]]; + self.registBtn.userInteractionEnabled = NO; + + }else{ + [btn setImage:[UIImage imageNamed:@"btn_right"] forState:UIControlStateNormal]; + [self.registBtn setBackgroundColor:GIGARGB(0, 222, 189, 1)]; + self.registBtn.userInteractionEnabled = YES; + } +} + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib index fbad89d..60c09be 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib @@ -27,129 +27,136 @@ - - - + + - - + - - + + - + - - + + - + - + - - + + - + - + - - + + - - + + - + - - + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m index 9e185ce..d8059ed 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.m @@ -49,9 +49,9 @@ NC_ADD_TARGET_NAME_OBJECT(self, @selector(WeiXinLongIn:), kWeiXinAuthrization_Success, nil) NC_ADD_TARGET_NAME_OBJECT(self, @selector(userRegistSuccsessNoti:), kUserRegistSucccess, nil) - if (![WXApi isWXAppInstalled]) { - self.weiXinLoginBtn.hidden = YES; - } +// if (![WXApi isWXAppInstalled]) { +// self.weiXinLoginBtn.hidden = YES; +// } } @@ -72,7 +72,7 @@ -(void)textFieldUI{ - //self.acountTextField.attributedPlaceholder = @""; + UIView *acountView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; UIImageView *acountViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,9, 12, 22)]; acountViewIcon.image = [UIImage imageNamed:@"ic_number"]; @@ -83,7 +83,7 @@ // NSAttributedString *passholderText = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UIColor redColor]}]; // self.passwordTextField.attributedPlaceholder = passholderText; UIView *passView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 9, 12, 22)]; + UIImageView *passViewIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,8, 12, 22)]; passViewIcon.image = [UIImage imageNamed:@"icon_key"]; [passView addSubview:passViewIcon]; self.passwordTextField.leftView = passView; @@ -91,8 +91,18 @@ self.loginBtn.layer.masksToBounds = YES; self.loginBtn.layer.cornerRadius = self.loginBtn.frame.size.height / 2; - self.weiXinLoginBtn.layer.masksToBounds = YES; - self.weiXinLoginBtn.layer.cornerRadius = self.weiXinLoginBtn.frame.size.height / 2; + NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] init]; + + NSTextAttachment *attch = [[NSTextAttachment alloc] init]; + attch.image = [UIImage imageNamed:@"ic_wechat"]; + attch.bounds = CGRectMake(0,-4, 12.9, 12.5); + NSAttributedString *imastr=[NSAttributedString attributedStringWithAttachment:attch]; + [attri appendAttributedString:imastr]; + + NSAttributedString *titleStr = [[NSAttributedString alloc] initWithString:@" 微信账号登录" attributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:10],NSForegroundColorAttributeName:[UIColor colorWithRed:187/255.0 green:187/255.0 blue:187/255.0 alpha:1/1.0]}]; + + [attri appendAttributedString:titleStr]; + [self.weiXinLoginBtn setAttributedTitle:attri forState:UIControlStateNormal]; } @@ -106,6 +116,21 @@ [super viewWillAppear:animated]; [self.navigationController.navigationBar setClearNav]; } + +-(void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = NO; + } +} + +-(void)viewWillDisappear:(BOOL)animated{ + [super viewWillDisappear:animated]; + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = YES; + } +} + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; @@ -172,7 +197,6 @@ // }]; [self.view makeToastActivity:CSToastPositionCenter]; - NSString *url = [NSString stringWithFormat:@"%@sys/v1/login",[GiGaServerConfig getMainUrl]]; [GiGaNetManager userLoginrequest:url params:params completionHandler:^(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error) { GILog(@"%@",resDic); @@ -181,6 +205,7 @@ GILog(@"**登陆***\n code:%ld\n message:%@\n *******\n",result.code,result.message); if (result.success) { + //token [GiGaUserDefault saveToken:resDic[@"token"]]; //埋点 [MobClick endEvent:MobClick_UserLogin]; @@ -189,6 +214,8 @@ GIGA_WIndowTost(@"登录成功!"); [self dismissViewControllerAnimated:YES completion:nil]; + }else{ + GIGA_ShowToast(result.message); } }]; diff --git a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib index 26dc3d1..d59e598 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaUserLoginVC.xib @@ -21,7 +21,6 @@ - @@ -41,7 +40,7 @@ - + @@ -50,7 +49,7 @@ - + @@ -73,8 +72,8 @@ - - + + @@ -87,33 +86,14 @@ - - - - - - - - + + - @@ -146,20 +145,19 @@ - - + - + + - @@ -168,7 +166,6 @@ - diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.h b/GIGA/Modules/LogIn/Controller/PassWordResetVC.h index ad0579d..7027f0a 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.h +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.h @@ -7,7 +7,7 @@ // #import - -@interface PassWordResetVC : UIViewController +#import "GiGaBaseViewController.h" +@interface PassWordResetVC : GiGaBaseViewController @end diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m index f714860..a05f9a3 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m @@ -7,6 +7,8 @@ // #import "PassWordResetVC.h" +#import "NSTimer+Convenience.h" +#import "GiGaBaseAPiRequest.h" @interface PassWordResetVC () @property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField; @@ -15,64 +17,170 @@ @property (weak, nonatomic) IBOutlet UITextField *passNewTextField; @property (weak, nonatomic) IBOutlet UIButton *confirmBtn; - +@property(nonatomic,strong) NSTimer*timer; +@property(nonatomic) NSInteger time; @end @implementation PassWordResetVC - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"重置密码"; - // Do any additional setup after loading the view from its nib. + //self.title = @"重置密码"; + [self addNavTitile:@"重置密码"]; [self confirmUI]; + _time = 60; + [self.codeSendBtn addTarget:self action:@selector(codeSendBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + [self.confirmBtn addTarget:self action:@selector(confirmBtnAction:) forControlEvents:UIControlEventTouchUpInside]; } -(void)confirmUI{ UIView *phoneView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - phoneView.backgroundColor = [UIColor redColor]; - UIImageView *phoneIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)]; - phoneIcon.image = [UIImage imageNamed:@""]; + + UIImageView *phoneIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 9, 12, 22)]; + phoneIcon.image = [UIImage imageNamed:@"ic_number"]; [phoneView addSubview:phoneIcon]; self.phoneNumberTextField.leftView = phoneView; self.phoneNumberTextField.leftViewMode = UITextFieldViewModeAlways; UIView *codeView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - codeView.backgroundColor = [UIColor redColor]; - UIImageView *codeIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)]; - codeIcon.image = [UIImage imageNamed:@""]; + + UIImageView *codeIcon = [[UIImageView alloc] initWithFrame:CGRectMake(11,13.5, 18, 13)]; + codeIcon.image = [UIImage imageNamed:@"ic_note"]; [codeView addSubview:codeIcon]; self.codeTextField.leftView = codeView; self.codeTextField.leftViewMode = UITextFieldViewModeAlways; - [self.passNewTextField setValue:[UIColor colorWithRed:153/255.0f green:153/255.0f blue:153/255.0f alpha:1] forKey:@"_placeholderLabel.textColor"]; + UIView *passView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; - passView.backgroundColor = [UIColor redColor]; - UIImageView *passIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 5, 16, 18)]; - passIcon.image = [UIImage imageNamed:@""]; + UIImageView *passIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15,10, 12, 22)]; + passIcon.image = [UIImage imageNamed:@"icon_key"]; [passView addSubview:passIcon]; self.passNewTextField.leftView = passView; self.passNewTextField.leftViewMode = UITextFieldViewModeAlways; - self.confirmBtn.layer.masksToBounds = YES; self.confirmBtn.layer.cornerRadius = self.confirmBtn.frame.size.height / 2; } +#pragma mark - 发送短信 +//短信发送 +-(void)codeSendBtnAction:(UIButton *)btn{ + if (self.phoneNumberTextField.text.length == 0) { + GIGA_ShowToast(@"请输入手机号"); + return; + } + if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) { + GIGA_ShowToast(@"请输入正确手机号"); + return; + } + btn.userInteractionEnabled = NO; + + [self startTimer:btn]; + [self requstCode:btn]; +} +//计时 +-(void)startTimer:(UIButton *)btn{ + + if (_time>0) { + _timer = [NSTimer scheduledTimerWithTimeInterval:1 count:60 callback:^{ + NSString *timeStr=[NSString stringWithFormat:@"%lds",(long)self->_time]; + [btn setTitle:timeStr forState:UIControlStateNormal]; + self->_time--; + + if (self->_time==0) { + [self.codeSendBtn setTitle:@"发送验证码" forState:UIControlStateNormal]; + self->_time =60; + btn.userInteractionEnabled = YES; + } + + }]; + [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes]; + } +} + +//获取验证码请求 +-(void)requstCode:(UIButton *)btn{ + + if (self.phoneNumberTextField.text.length == 0) { + GIGA_ShowToast(@"请输入手机号"); + return; + } + if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) { + GIGA_ShowToast(@"请输入正确手机号"); + return; + } + + [self.view makeToastActivity:CSToastPositionCenter]; + NSDictionary *params = @{@"mobile":self.phoneNumberTextField.text}; + GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"msg/sms/v1/retrievesendcode" method:RequestPostMethod parms:params]; + [requst requstDataWithResult:^(GiGaAPIResult *result) { + btn.userInteractionEnabled = YES; + [self.view hideToastActivity]; + GIGA_ShowToast(result.message); + + }]; + +} + +#pragma mark - 确认 +-(void)confirmBtnAction:(UIButton *)btn{ + + if (self.phoneNumberTextField.text.length == 0) { + GIGA_ShowToast(@"请输入手机号"); + return; + } + if (![GiGaHelper isPhoneNumber:self.phoneNumberTextField.text]) { + GIGA_ShowToast(@"请输入正确手机号"); + return; + } + + if (self.codeTextField.text.length == 0) { + GIGA_ShowToast(@"请输入验证码"); + return; + } + + if (self.passNewTextField.text.length == 0) { + GIGA_ShowToast(@"请输入新密码"); + return; + } + if (!(self.passNewTextField.text.length >= 6 && self.passNewTextField.text.length <= 20)) { + GIGA_ShowToast(@"请输入6~20位新密码"); + return; + } + btn.userInteractionEnabled = NO; + [self.view makeToastActivity:CSToastPositionCenter]; + NSDictionary *params = @{ + @"username":self.phoneNumberTextField.text, + @"password":self.passNewTextField.text, + @"verifiedCode":self.codeTextField.text + + }; + GiGaBaseAPiRequest *requst = [GiGaBaseAPiRequest initWithRequestPath:@"sys/v1/retrievepwd" method:RequestPostMethod parms:params]; + [requst requstDataWithResult:^(GiGaAPIResult *result) { + [self.view hideToastActivity]; + btn.userInteractionEnabled = YES; + if (result.success) { + GIGA_WIndowTost(result.message); + [self.navigationController popViewControllerAnimated:YES]; + } + + }]; +} + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +-(void)dealloc{ + if (_timer) { + [_timer unfireTimer]; + [_timer invalidate]; + _timer = nil; + + } } -*/ @end diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib index 237a769..3d6f52a 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib @@ -25,103 +25,107 @@ - + - + - - + + - - + + - + - + - + - - + + - - + + - + - - + + - + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m b/GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m index 9a0c049..0e0f39f 100644 --- a/GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m +++ b/GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m @@ -39,7 +39,6 @@ make.centerX.mas_equalTo(self.view.mas_centerX); make.top.mas_equalTo(self.view.mas_top).offset(200); }]; - dismisBtn.layer.masksToBounds = YES; dismisBtn.layer.cornerRadius = 15; @@ -47,7 +46,6 @@ -(void)dismisBtnAction{ - [self dismissViewControllerAnimated:YES completion:^{ NC_POST_NAME_OBJECT(APP_GUARD_DISSMISS, nil); }]; @@ -58,14 +56,4 @@ // Dispose of any resources that can be recreated. } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m b/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m index d100cbd..6879e2e 100644 --- a/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m +++ b/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m @@ -35,10 +35,10 @@ //@property (nonatomic,strong) GiGaFlyingCommitInputView *commitInputView; @property(nonatomic,strong) UIImageView *maskImageView; @property(nonatomic,strong) UIImageView *faceView; -@property(nonatomic,strong) UIDynamicAnimator *animator; -@property(nonatomic,strong) UIAttachmentBehavior *attachmentBehavior; +//@property(nonatomic,strong) UIDynamicAnimator *animator; +//@property(nonatomic,strong) UIAttachmentBehavior *attachmentBehavior; @property(nonatomic) CGPoint attachPoint; -@property(nonatomic) UISnapBehavior *snapBehavior; +//@property(nonatomic) UISnapBehavior *snapBehavior; @end @@ -167,11 +167,31 @@ -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; + +} + +-(void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = NO; + } + + BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd]; + if (showAppGaurd == NO) { + [self showAPPappGaurdView]; + } +} +-(void)viewWillDisappear:(BOOL)animated{ + [super viewWillDisappear:animated]; + if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = YES; + } } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. + [self setUpNav]; [self initUI]; [self addNotify]; @@ -185,7 +205,7 @@ [self.view bringSubviewToFront:self.maskImageView]; [self.view addSubview:self.countLabel]; - self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; + //self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; //face [self.faceView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -361,7 +381,6 @@ if (isUserLogin) { - //GIGA_ShowToast(@"userLogin!"); GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init]; [self.navigationController pushViewController:questionVC animated:YES]; @@ -372,15 +391,7 @@ } } --(void)viewDidAppear:(BOOL)animated{ - [super viewDidAppear:animated]; - - BOOL showAppGaurd = [GiGaUserDefault isShowedAppGaurd]; - - if (!showAppGaurd) { - [self showAPPappGaurdView]; - } -} + -(void)addNotify{ @@ -405,7 +416,7 @@ -(void)appGauardViewDissmiss{ //出现新手引导 BOOL isshowGaurd = [GiGaUserDefault isShowedGaurd]; - if (!isshowGaurd) { + if (isshowGaurd == NO) { NSLog(@"%d",(int)isshowGaurd ); [self showUserGaurdView]; } @@ -434,6 +445,7 @@ #pragma mark App引导页 -(void)showAPPappGaurdView{ + GiGaAppGaurdVC *gaurdVC = [[GiGaAppGaurdVC alloc] init]; [self presentViewController:gaurdVC animated:YES completion:nil]; }