Abel 1 rok pred
rodič
commit
ba434327d9

+ 24 - 0
Asteria.xcodeproj/project.pbxproj

@@ -167,6 +167,10 @@
 		81DFA5712A46D95400DA708B /* ASPointDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5702A46D95400DA708B /* ASPointDetailCell.m */; };
 		81DFA5752A47D97C00DA708B /* ASCouponsListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5742A47D97C00DA708B /* ASCouponsListViewController.m */; };
 		81DFA5782A47F28D00DA708B /* ASCouponListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5772A47F28D00DA708B /* ASCouponListCell.m */; };
+		81E195152C01664E005471A1 /* APPassForgetEmailV.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E195102C01664D005471A1 /* APPassForgetEmailV.m */; };
+		81E195162C01664E005471A1 /* LoginForgotC.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E195112C01664D005471A1 /* LoginForgotC.m */; };
+		81E195172C01664E005471A1 /* APPassForgetCodeV.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E195122C01664D005471A1 /* APPassForgetCodeV.m */; };
+		81E195182C01664E005471A1 /* APPassForgetNewPassV.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E195142C01664E005471A1 /* APPassForgetNewPassV.m */; };
 		81E257EE2A120756004EEF71 /* ASUserCenterTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E257ED2A120756004EEF71 /* ASUserCenterTopView.m */; };
 		81E257F32A120975004EEF71 /* ASUserBaseInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E257F22A120975004EEF71 /* ASUserBaseInfoView.m */; };
 		81E257F62A12259B004EEF71 /* UserCenter.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81E257F52A12259B004EEF71 /* UserCenter.xcassets */; };
@@ -680,6 +684,14 @@
 		81DFA5742A47D97C00DA708B /* ASCouponsListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCouponsListViewController.m; sourceTree = "<group>"; };
 		81DFA5762A47F28D00DA708B /* ASCouponListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCouponListCell.h; sourceTree = "<group>"; };
 		81DFA5772A47F28D00DA708B /* ASCouponListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCouponListCell.m; sourceTree = "<group>"; };
+		81E1950D2C01664C005471A1 /* LoginForgotC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginForgotC.h; sourceTree = "<group>"; };
+		81E1950E2C01664C005471A1 /* APPassForgetCodeV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APPassForgetCodeV.h; sourceTree = "<group>"; };
+		81E1950F2C01664C005471A1 /* APPassForgetNewPassV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APPassForgetNewPassV.h; sourceTree = "<group>"; };
+		81E195102C01664D005471A1 /* APPassForgetEmailV.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APPassForgetEmailV.m; sourceTree = "<group>"; };
+		81E195112C01664D005471A1 /* LoginForgotC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginForgotC.m; sourceTree = "<group>"; };
+		81E195122C01664D005471A1 /* APPassForgetCodeV.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APPassForgetCodeV.m; sourceTree = "<group>"; };
+		81E195132C01664D005471A1 /* APPassForgetEmailV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APPassForgetEmailV.h; sourceTree = "<group>"; };
+		81E195142C01664E005471A1 /* APPassForgetNewPassV.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APPassForgetNewPassV.m; sourceTree = "<group>"; };
 		81E257EC2A120756004EEF71 /* ASUserCenterTopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASUserCenterTopView.h; sourceTree = "<group>"; };
 		81E257ED2A120756004EEF71 /* ASUserCenterTopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASUserCenterTopView.m; sourceTree = "<group>"; };
 		81E257F12A120975004EEF71 /* ASUserBaseInfoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASUserBaseInfoView.h; sourceTree = "<group>"; };
@@ -2182,6 +2194,12 @@
 		9A65DE4E2A132BDF00BB1269 /* V */ = {
 			isa = PBXGroup;
 			children = (
+				81E1950E2C01664C005471A1 /* APPassForgetCodeV.h */,
+				81E195122C01664D005471A1 /* APPassForgetCodeV.m */,
+				81E195132C01664D005471A1 /* APPassForgetEmailV.h */,
+				81E195102C01664D005471A1 /* APPassForgetEmailV.m */,
+				81E1950F2C01664C005471A1 /* APPassForgetNewPassV.h */,
+				81E195142C01664E005471A1 /* APPassForgetNewPassV.m */,
 				9ACBEC262A1472AF00A8F97A /* LoginSignUpV.h */,
 				9ACBEC272A1472AF00A8F97A /* LoginSignUpV.m */,
 				9A65DE4F2A132FB700BB1269 /* LoginThirdAuthV.h */,
@@ -2290,6 +2308,8 @@
 				9A5C64572A12064300CBB185 /* AS_LoginC.m */,
 				9ACBEC232A14707400A8F97A /* AS_SignUpC.h */,
 				9ACBEC242A14707400A8F97A /* AS_SignUpC.m */,
+				81E1950D2C01664C005471A1 /* LoginForgotC.h */,
+				81E195112C01664D005471A1 /* LoginForgotC.m */,
 				9A1247952A1B0A2800126226 /* AS_ForgotC.h */,
 				9A1247962A1B0A2800126226 /* AS_ForgotC.m */,
 			);
@@ -2895,6 +2915,7 @@
 				81C326662A36B794002EF442 /* VerScrollTextView.m in Sources */,
 				81E5EE972A4A822D0075695F /* ASVipCenterCollectCell.m in Sources */,
 				81C796272A4FD898003083B8 /* ASBirthdayTreatViewController.m in Sources */,
+				81E195152C01664E005471A1 /* APPassForgetEmailV.m in Sources */,
 				81717D372A3D322700648139 /* KWHisCollectHeaderView.m in Sources */,
 				8810F5212BEDABFA00346FD4 /* ASCheckoutCommentCell.m in Sources */,
 				9AD346132A08D60F005CA070 /* ZFLoadingView.m in Sources */,
@@ -2985,6 +3006,7 @@
 				9AD345FB2A08D60F005CA070 /* ZFOrientationObserver.m in Sources */,
 				9AD346192A08D679005CA070 /* GoodsBannerModel.m in Sources */,
 				81717C942A3BE4E000648139 /* ASProductListSortFilterCell.m in Sources */,
+				81E195182C01664E005471A1 /* APPassForgetNewPassV.m in Sources */,
 				81056D5C2B60F571009219A3 /* ASHelpListUrlModel.m in Sources */,
 				9AD346082A08D60F005CA070 /* ZFIJKPlayerManager.m in Sources */,
 				9AD3459E2A08D545005CA070 /* GoodsDetailSrcView.m in Sources */,
@@ -3080,6 +3102,7 @@
 				8134C1B42A1358F3006EB0EC /* ASSginView.m in Sources */,
 				9AD346122A08D60F005CA070 /* ZFSmallFloatControlView.m in Sources */,
 				8131A2842B36882500A191BE /* ASCustomAlertViewController.m in Sources */,
+				81E195162C01664E005471A1 /* LoginForgotC.m in Sources */,
 				81EC47752A3423FC00516573 /* ASHomeLookingCell.m in Sources */,
 				9AD3460E2A08D60F005CA070 /* ZFNetworkSpeedMonitor.m in Sources */,
 				8810F50C2BEB590C00346FD4 /* ASCheckoutPointApplyCell.m in Sources */,
@@ -3090,6 +3113,7 @@
 				9A32A2212B4BEA5C005A5831 /* GoodsReviewsCell.m in Sources */,
 				9A5F528D2B5F59D1007D3791 /* GoodsSizeSelectTableV.m in Sources */,
 				81717D222A3C4AE000648139 /* KWSearchMainTypeCell.m in Sources */,
+				81E195172C01664E005471A1 /* APPassForgetCodeV.m in Sources */,
 				81DFA5672A46D60900DA708B /* ASPointDetailViewController.m in Sources */,
 				81601FF62A2DC78300E4A8F1 /* WMZBannerFlowLayout.m in Sources */,
 				814F5CF52A11B37E003847A9 /* ASUserAvaterView.m in Sources */,

+ 4 - 0
Asteria/ASUI/CustomView/textField/KWTextField.h

@@ -15,6 +15,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface UIView(baseInit)
 
+- (void)sleep:(NSTimeInterval)time;
+
+- (void)addSubviews:(NSArray <UIView *>*)arr;
+
 // MARK: - base create
 + (UIView *)baseV ;
 

+ 13 - 0
Asteria/ASUI/CustomView/textField/KWTextField.m

@@ -34,6 +34,19 @@
 
 @implementation UIView(baseInit)
 
+- (void)sleep:(NSTimeInterval)time {
+    self.userInteractionEnabled = false;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, time), dispatch_get_main_queue(), ^{
+        self.userInteractionEnabled = true;
+    });
+}
+
+- (void)addSubviews:(NSArray <UIView *>*)arr {
+    for (UIView *temp in arr) {
+        [self addSubview:temp];
+    }
+}
+
 // MARK: - base create
 + (UIView *)baseV {
     UIView *v = [[UIView alloc] init];

+ 3 - 1
Asteria/ASUI/SimpleBase/ASBaseViewController.m

@@ -220,7 +220,9 @@
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    self.tabBarController.tabBar.hidden = self.navigationController.viewControllers.count > 1;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        self.tabBarController.tabBar.hidden = self.navigationController.viewControllers.count > 1;
+    });
 }
 
 - (void)viewWillDisappear:(BOOL)animated {

+ 4 - 0
Asteria/Category/NSMutableAttributedString+RYText.h

@@ -20,6 +20,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, readwrite) NSUnderlineStyle underlineStyle;
 - (void)setUnderlineStyle:(NSUnderlineStyle)underlineStyle range:(NSRange)range;
+
+- (void)setAttributes:(NSDictionary *)attributes;
+- (void)setAttribute:(NSString *)name value:(id)value;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 10 - 0
Asteria/Category/NSMutableAttributedString+RYText.m

@@ -85,6 +85,16 @@
     return [self attribute:attributeName atIndex:index effectiveRange:NULL];
 }
 
+- (void)setAttributes:(NSDictionary *)attributes {
+    if (attributes == (id)[NSNull null]) attributes = nil;
+    [self setAttributes:@{} range:NSMakeRange(0, self.length)];
+    [attributes enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
+        [self setAttribute:key value:obj];
+    }];
+}
+- (void)setAttribute:(NSString *)name value:(id)value {
+    [self setAttribute:name value:value range:NSMakeRange(0, self.length)];
+}
 
 
 @end

+ 23 - 0
Asteria/Fuction/Login/Assets/Login.xcassets/login_close_black.imageset/Contents.json

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

BIN
Asteria/Fuction/Login/Assets/Login.xcassets/login_close_black.imageset/组 8378.png


BIN
Asteria/Fuction/Login/Assets/Login.xcassets/login_close_black.imageset/组 8378@2x.png


BIN
Asteria/Fuction/Login/Assets/Login.xcassets/login_close_black.imageset/组 8378@3x.png


+ 22 - 0
Asteria/Fuction/Login/V/APPassForgetCodeV.h

@@ -0,0 +1,22 @@
+//
+//  APPassForgetCodeV.h
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APPassForgetCodeV : UIView
+
+@property (nonatomic, copy) NSString *emailAddr;
+@property (nonatomic, copy) void(^resendBtnClick)(void);
+@property (nonatomic, copy) void(^subBtnClick)(NSString *);
+@property (nonatomic, copy) void(^noReceiveClick)(void);
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 225 - 0
Asteria/Fuction/Login/V/APPassForgetCodeV.m

@@ -0,0 +1,225 @@
+//
+//  APPassForgetCodeV.m
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import "APPassForgetCodeV.h"
+#import "KWTextField.h"
+
+
+@interface APPassForgetCodeV ()
+
+@property (nonatomic, strong) UILabel *detailLab;
+@property (nonatomic, strong) KWTextField *codeTf;
+@property (nonatomic, strong) UIButton *xxx_sureBtn;
+@property (nonatomic, strong) UIButton *resendBtn;
+@property (nonatomic, strong) UIButton *notReceiveBtn;
+
+@property (nonatomic, strong) NSTimer *timer;
+@property (nonatomic, assign) NSInteger totalTime;
+
+@end
+
+@implementation APPassForgetCodeV
+
+- (void)timerAction {
+    self.totalTime -= 1;
+    BOOL cantabel = self.totalTime > 0;
+    NSString *titleStr = cantabel ? [NSString stringWithFormat:@"%lds",self.totalTime] : @"Resend";
+    [self.resendBtn setTitle:titleStr forState:UIControlStateNormal];
+    self.resendBtn.backgroundColor = cantabel ? Col_666 : Col_000;
+    self.resendBtn.enabled = !cantabel;
+    if (!cantabel) {
+        [self.timer invalidate];
+        self.timer = nil;
+    }
+}
+
+- (void)setEmailAddr:(NSString *)emailAddr {
+    _emailAddr = emailAddr;
+    NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Enter The Verification Code Below To Reset Your Password Within 30 Minutes."]];
+    NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
+    style.alignment = NSTextAlignmentCenter;
+    style.lineSpacing = 6;
+    [att setAttributes:@{
+        NSParagraphStyleAttributeName:style,
+        NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:14],
+        NSForegroundColorAttributeName:[UIColor blackColor],
+    }];
+//    [att addAttribute:NSForegroundColorAttributeName value:_FF5900 range:[att.string rangeOfString:self.emailAddr]];
+    
+    self.detailLab.attributedText = att;
+}
+
+
+- (void)action_submitClick:(UIButton *)bt {
+    [bt sleep:1];
+    NSString *code = self.codeTf.text;
+    if (code == nil || code.isEmpty) {
+        [self makeToast:@"The Code Can't Be Empty"];
+        return;
+    }
+    if (self.subBtnClick) {
+        self.subBtnClick(code);
+    }
+}
+
+- (void)resendBtAction:(UIButton *)bt {
+    [bt sleep:1];
+    self.totalTime = 60;
+    self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerAction) userInfo:nil repeats:true];
+    if (self.resendBtnClick) {
+        self.resendBtnClick();
+    }
+}
+
+- (void)noreceiveBtAction:(UIButton *)bt {
+    [bt sleep:1];
+    if (self.noReceiveClick) {
+        self.noReceiveClick();
+    }
+}
+
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self loadSubV];
+    }
+    return self;
+}
+
+- (void)loadSubV {
+    UILabel *titileLab = [UILabel new];
+    titileLab.text = @"RESET PASSWORD";
+    titileLab.font = [UIFont boldSystemFontOfSize:16];
+    titileLab.textAlignment = NSTextAlignmentCenter;
+    titileLab.textColor = [UIColor colorWithHexString:@"#000000"];
+    [self addSubview:titileLab];
+    
+    UILabel *detailLab = [UILabel baseLb];
+    detailLab.textAlignment = NSTextAlignmentCenter;
+    detailLab.font =  [UIFont fontWithName:Rob_Regular size:14];
+    detailLab.numberOfLines = 0;
+    [self addSubview:detailLab];
+    self.detailLab = detailLab;
+    
+    [titileLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(@40);
+        make.leading.equalTo(self).offset(30);
+        make.trailing.equalTo(self).offset(-30);
+    }];
+    
+    [detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(titileLab.mas_bottom).offset(40);
+        make.leading.equalTo(self).offset(30);
+        make.trailing.equalTo(self).offset(-30);
+    }];
+    
+    
+    [self addSubviews:@[self.codeTf, self.resendBtn]];
+    [self.codeTf mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(detailLab.mas_bottom).offset(40);
+        make.leading.equalTo(@20);
+        make.height.equalTo(@45);
+    }];
+    [self.resendBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.equalTo(@82);
+        make.top.bottom.equalTo(self.codeTf);
+        make.leading.equalTo(self.codeTf.mas_trailing);
+        make.trailing.equalTo(self).offset(-20);
+    }];
+    
+    
+    [self addSubview:self.xxx_sureBtn];
+    [self addSubview:self.notReceiveBtn];
+    
+    [self.xxx_sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.codeTf.mas_bottom).offset(30);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(self).offset(-20);
+        make.height.equalTo(@45);
+    }];
+    
+    [self.notReceiveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.xxx_sureBtn.mas_bottom).offset(13);
+        make.leading.equalTo(@30);
+        make.trailing.equalTo(self).offset(-30);
+        make.height.equalTo(@28);
+        make.bottom.equalTo(self).offset(-30);
+    }];
+}
+
+- (KWTextField *)codeTf {
+    if (!_codeTf) {
+        KWTextField *tf = [[KWTextField alloc] init];
+        tf.placeholder = @"Enter The Code";
+        _codeTf = tf;
+    }
+    return _codeTf;
+}
+
+
+
+
+-(UIButton *)xxx_sureBtn{
+    if (!_xxx_sureBtn) {
+        _xxx_sureBtn = [TT_ControlTool FTT_ControlToolUIButtonFrame:CGRectMake(0,0 ,SCREEN_WIDTH-40,50)
+                                                                 taeget:self
+                                                                sel:@selector(action_submitClick:)
+                                                                    tag:0
+                                                               AntTitle:@"SUBMIT"
+                                                              titleFont:17
+                                                             titleColor:[UIColor whiteColor]
+                                                               andImage:nil
+                                                           AndBackColor:nil
+                                                adjustsFontSizesTowidth:NO
+                                                          masksToBounds:YES
+                                                           conrenRadius:5
+                                                            BorderColor:nil
+                                                            BorderWidth:0
+                                              ContentHorizontalAligment:0];
+        _xxx_sureBtn.backgroundColor = [UIColor blackColor];
+
+    }
+    return _xxx_sureBtn;
+}
+
+
+- (UIButton *)notReceiveBtn {
+    if (!_notReceiveBtn) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithString:@"I Didn’t Receive Your Email Yet"];
+        [att setAttributes:@{
+            NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:12],
+            NSForegroundColorAttributeName:[UIColor blackColor],
+            NSUnderlineStyleAttributeName:@(NSUnderlineStyleSingle),
+        }];
+        [bt setAttributedTitle:att forState:UIControlStateNormal];
+        bt.titleLabel.font = [UIFont fontWithName:Rob_Regular size:12];
+        [bt setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+        [bt addTarget:self action:@selector(noreceiveBtAction:) forControlEvents:UIControlEventTouchUpInside];
+        _notReceiveBtn = bt;
+    }
+    return _notReceiveBtn;
+}
+
+
+
+- (UIButton *)resendBtn {
+    if (!_resendBtn) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setTitle:@"Resend" forState:UIControlStateNormal];
+        bt.titleLabel.font = [UIFont fontWithName:Rob_Regular size:14];
+        [bt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        [bt setBackgroundColor:[UIColor colorWithHexString:@"#000000"]];
+        [bt addTarget:self action:@selector(resendBtAction:) forControlEvents:UIControlEventTouchUpInside];
+        _resendBtn = bt;
+    }
+    return _resendBtn;
+}
+
+@end

+ 18 - 0
Asteria/Fuction/Login/V/APPassForgetEmailV.h

@@ -0,0 +1,18 @@
+//
+//  APPassForgetEmailV.h
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APPassForgetEmailV : UIView
+
+@property (nonatomic, copy) void(^btnClick)(NSString *);
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 126 - 0
Asteria/Fuction/Login/V/APPassForgetEmailV.m

@@ -0,0 +1,126 @@
+//
+//  APPassForgetEmailV.m
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import "APPassForgetEmailV.h"
+#import "KWTextField.h"
+
+@interface APPassForgetEmailV ()
+
+@property (nonatomic, strong) KWTextField *codeTf;
+@property (nonatomic, strong) UIButton *xxx_sureBtn;
+
+@end
+
+@implementation APPassForgetEmailV
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self loadSubV];
+    }
+    return self;
+}
+
+- (void)action_submitClick:(UIButton *)bt {
+    [bt sleep:1];
+    NSString *code = self.codeTf.text;
+    if (code == nil || code.isEmpty) {
+        [self makeToast:@"The Email Can't Be Empty"];
+        return;
+    }
+    if (self.btnClick) {
+        self.btnClick(code);
+    }
+}
+
+- (void)loadSubV {
+    UILabel *titileLab = [UILabel new];
+    titileLab.text = @"RESET PASSWORD";
+    titileLab.font = [UIFont boldSystemFontOfSize:16];
+    titileLab.textAlignment = NSTextAlignmentCenter;
+    titileLab.textColor = [UIColor colorWithHexString:@"#000000"];
+    [self addSubview:titileLab];
+    
+    UILabel *detailLab = [UILabel baseLb];
+    detailLab.text =  @"Enter Your Email Address And We Will Send You A Verification Code To Reset Your Password.";
+    detailLab.textAlignment = NSTextAlignmentCenter;
+    detailLab.numberOfLines = 0;
+    detailLab.font =  [UIFont fontWithName:Rob_Regular size:14];
+    [self addSubview:detailLab];
+    
+    [self addSubview:self.codeTf];
+    
+    [self addSubview:self.xxx_sureBtn];
+    [self bringSubviewToFront:self.codeTf];
+    
+    [titileLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(@40);
+        make.leading.equalTo(self).offset(30);
+        make.trailing.equalTo(self).offset(-30);
+    }];
+    
+    [detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(titileLab.mas_bottom).offset(40);
+        make.leading.equalTo(self).offset(30);
+        make.trailing.equalTo(self).offset(-30);
+    }];
+    
+    [self.codeTf mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(detailLab.mas_bottom).offset(40);
+        make.trailing.equalTo(self).offset(-20);
+        make.leading.equalTo(self).offset(20);
+
+        make.height.equalTo(@45);
+    }];
+    [self.xxx_sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.codeTf.mas_bottom).offset(30);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(self).offset(-20);
+        make.height.equalTo(@45);
+        make.bottom.equalTo(self).offset(-30);
+    }];
+    
+}
+
+- (KWTextField *)codeTf {
+    if (!_codeTf) {
+        KWTextField *tf = [[KWTextField alloc] init];
+        tf.placeholder = @"Enter The Email";
+        _codeTf = tf;
+    }
+    return _codeTf;
+}
+
+
+
+
+-(UIButton *)xxx_sureBtn{
+    if (!_xxx_sureBtn) {
+        _xxx_sureBtn = [TT_ControlTool FTT_ControlToolUIButtonFrame:CGRectMake(0,0 ,SCREEN_WIDTH-40,50)
+                                                                 taeget:self
+                                                                sel:@selector(action_submitClick:)
+                                                                    tag:0
+                                                               AntTitle:@"SUBMIT"
+                                                              titleFont:17
+                                                             titleColor:[UIColor whiteColor]
+                                                               andImage:nil
+                                                           AndBackColor:nil
+                                                adjustsFontSizesTowidth:NO
+                                                          masksToBounds:YES
+                                                           conrenRadius:5
+                                                            BorderColor:nil
+                                                            BorderWidth:0
+                                              ContentHorizontalAligment:0];
+        _xxx_sureBtn.backgroundColor = [UIColor blackColor];
+
+    }
+    return _xxx_sureBtn;
+}
+
+
+@end

+ 20 - 0
Asteria/Fuction/Login/V/APPassForgetNewPassV.h

@@ -0,0 +1,20 @@
+//
+//  APPassForgetNewPassV.h
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APPassForgetNewPassV : UIView
+
+
+@property (nonatomic, copy) void(^btnClick)(NSString *);
+
+- (void)clearPass;
+@end
+
+NS_ASSUME_NONNULL_END

+ 202 - 0
Asteria/Fuction/Login/V/APPassForgetNewPassV.m

@@ -0,0 +1,202 @@
+//
+//  APPassForgetNewPassV.m
+//  westkissMob
+//
+//  Created by iOS on 2024/4/24.
+//
+
+#import "APPassForgetNewPassV.h"
+#import "KWTextField.h"
+
+@interface APPassForgetNewPassV ()
+
+@property (nonatomic, strong) KWTextField *passTf;
+@property (nonatomic, strong) KWTextField *conPassTf;
+@property (nonatomic, strong) UILabel *passTitleLb;
+@property (nonatomic, strong) UILabel *conpassTitleLb;
+
+@property (nonatomic, strong) UIButton *commitBtn;
+
+@end
+
+@implementation APPassForgetNewPassV
+
+- (void)clearPass {
+    self.passTf.text = @"";
+    self.conPassTf.text = @"";
+}
+
+- (void)commitBtnAction:(UIButton *)bt {
+    [bt sleep:1];
+    NSString *pass = self.passTf.text;
+    NSString *conPass = self.conPassTf.text;
+    if (pass == nil || pass.isEmpty || pass.length < 6) {
+        [self makeToast:@"The Password Can't Less Than 6 Character"];
+        return;
+    }
+    if (![pass isEqualToString:conPass]) {
+        [self makeToast:@"The Confirm Password Mast Same to New Password"];
+        return;
+    }
+    if (self.btnClick) {
+        self.btnClick(pass);
+    }
+}
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self loadSubV];
+    }
+    return self;
+}
+
+- (void)loadSubV {
+    UILabel *titileLab = [UILabel new];
+    titileLab.text = @"RESET PASSWORD";
+    titileLab.font = [UIFont boldSystemFontOfSize:16];
+    titileLab.textAlignment = NSTextAlignmentCenter;
+    titileLab.textColor = [UIColor colorWithHexString:@"#000000"];
+    [self addSubview:titileLab];
+    
+    [titileLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(@30);
+        make.leading.equalTo(self).offset(30);
+        make.trailing.equalTo(self).offset(-30);
+    }];
+    
+    [self addSubviews:@[self.passTitleLb, self.passTf, self.conpassTitleLb, self.conPassTf, self.commitBtn]];
+    
+    
+    [self.passTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(titileLab.mas_bottom).offset(40);
+        make.height.equalTo(@14);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(@(-20));
+    }];
+    [self.passTf mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.passTitleLb.mas_bottom).offset(10);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(@(-20));
+        make.height.equalTo(@45);
+    }];
+    
+    [self.conpassTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.passTf.mas_bottom).offset(30);
+        make.height.equalTo(@14);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(@(-20));
+    }];
+    [self.conPassTf mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.conpassTitleLb.mas_bottom).offset(10);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(@(-20));
+        make.height.equalTo(@45);
+    }];
+    
+    [self.commitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.conPassTf.mas_bottom).offset(31);
+        make.height.equalTo(@45);
+        make.leading.equalTo(@20);
+        make.trailing.equalTo(@(-20));
+        make.bottom.equalTo(self).offset(-30);
+    }];
+    
+    
+}
+
+
+
+- (KWTextField *)passTf {
+    if (!_passTf) {
+        KWTextField *tf = [[KWTextField alloc] init];
+        tf.placeholder = @"* Password";
+        tf.rightView = [self getPassRightBt:800000];
+        tf.rightViewMode = UITextFieldViewModeAlways;
+        _passTf = tf;
+    }
+    return _passTf;
+}
+
+- (KWTextField *)conPassTf {
+    if (!_conPassTf) {
+        KWTextField *tf = [[KWTextField alloc] init];
+        tf.placeholder = @"* Confirm Password";
+        tf.rightView = [self getPassRightBt:800001];
+        tf.rightViewMode = UITextFieldViewModeAlways;
+        _conPassTf = tf;
+    }
+    return _conPassTf;
+}
+
+- (UILabel *)passTitleLb {
+    if (!_passTitleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Regular size:12];
+        lb.text = @"New Password";
+        lb.textColor = Col_000;
+        _passTitleLb = lb;
+    }
+    return _passTitleLb;
+}
+
+- (UILabel *)conpassTitleLb {
+    if (!_conpassTitleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Regular size:12];
+        lb.text = @"Confirm Password";
+        lb.textColor = Col_000;
+        _conpassTitleLb = lb;
+    }
+    return _conpassTitleLb;
+}
+
+- (UIButton *)commitBtn {
+    if (!_commitBtn) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setTitle:@"SUBMIT" forState:UIControlStateNormal];
+        bt.titleLabel.font = [UIFont fontWithName:Rob_Regular size:14];
+        [bt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        [bt setBackgroundColor:[UIColor colorWithHexString:@"#000000"]];
+        bt.layer.cornerRadius = 4;
+        bt.layer.masksToBounds = true;
+        [bt addTarget:self action:@selector(commitBtnAction:) forControlEvents:UIControlEventTouchUpInside];
+        _commitBtn = bt;
+    }
+    return _commitBtn;
+}
+
+- (UIView *)getPassRightBt:(NSInteger)tag {
+    UIView *v = [UIView new];
+    v.backgroundColor = UIColor.clearColor;
+    UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+    [bt setImage:[UIImage imageNamed:@"login_password_secure"] forState:UIControlStateNormal];
+    [bt setImage:[UIImage imageNamed:@"login_password_secure_display"] forState:UIControlStateSelected];
+    [bt addTarget:self action:@selector(tfBtAction:) forControlEvents:UIControlEventTouchUpInside];
+    bt.tag = tag;
+    [v addSubview:bt];
+    [bt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.height.equalTo(@30);
+        make.right.equalTo(v).offset(-17);
+        make.centerY.equalTo(v);
+    }];
+    [v mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.equalTo(@50);
+        make.height.equalTo(@43);
+    }];
+    return v;
+}
+
+- (void)tfBtAction:(UIButton *)bt {
+    NSInteger tag = bt.tag - 800000;
+    bt.selected = !bt.isSelected;
+    if (tag == 0) {
+        self.passTf.secureTextEntry = !bt.isSelected;
+    } else {
+        self.conPassTf.secureTextEntry = !bt.isSelected;
+    }
+}
+
+
+@end

+ 4 - 4
Asteria/Fuction/Login/VC/AS_LoginC.m

@@ -12,7 +12,7 @@
 
 #import <AFNetworking/AFNetworking.h>
 #import "AS_SignUpC.h"
-#import "AS_ForgotC.h"
+#import "LoginForgotC.h"
 
 
 
@@ -138,7 +138,7 @@
     
 }
 -(void)handle_forgetBtnEvent:(UIButton *)btn{
-    AS_ForgotC *forgoC = [[AS_ForgotC alloc]init];
+    LoginForgotC *forgoC = [[LoginForgotC alloc]init];
     [self.navigationController pushViewController:forgoC animated:YES];
 }
 
@@ -208,7 +208,7 @@
 
 
 -(UIView *)load_bottom_v{
-    UIView *bottomV = [[UIView alloc]initWithFrame:CGRectMake(20, 0, KScreenWidth-40, 32)];
+    UIView *bottomV = [[UIView alloc]initWithFrame:CGRectMake(20, 0, KScreenWidth-40, 46)];
     QMUILabel *disLab = [[QMUILabel alloc]init];
     disLab.text = @"Don't Have An Account?";
     disLab.font = [UIFont fontWithName:Rob_Regular size:12];
@@ -245,7 +245,7 @@
     [forgetBtn mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(0);
         make.top.equalTo(disLab.mas_bottom).offset(10);
-        make.height.mas_equalTo(15);
+        make.height.mas_equalTo(20);
         make.width.mas_equalTo(120);
     }];
     

+ 16 - 0
Asteria/Fuction/Login/VC/LoginForgotC.h

@@ -0,0 +1,16 @@
+//
+//  LoginForgotC.h
+//  westkissMob
+//
+//  Created by 王猛 on 2022/9/6.
+//
+
+#import "ASBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LoginForgotC : ASBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 258 - 0
Asteria/Fuction/Login/VC/LoginForgotC.m

@@ -0,0 +1,258 @@
+//
+//  LoginForgotC.m
+//  westkissMob
+//
+//  Created by 王猛 on 2022/9/6.
+//
+
+#import "LoginForgotC.h"
+#import "APPassForgetCodeV.h"
+#import "APPassForgetEmailV.h"
+#import "APPassForgetNewPassV.h"
+
+@interface LoginForgotC ()
+
+@property (nonatomic, copy) NSString *email;
+@property (nonatomic, copy) NSString *code;
+@property (nonatomic, copy) NSString *pass;
+
+// 0:emailV  1:codeV 2:passV
+@property (nonatomic, assign) NSInteger showType;
+
+@property (nonatomic , strong) UIScrollView *scrollview;
+
+@property (nonatomic, strong) APPassForgetEmailV *emailV;
+@property (nonatomic, strong) APPassForgetCodeV *codeV;
+@property (nonatomic, strong) APPassForgetNewPassV *passV;
+
+@end
+
+@implementation LoginForgotC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self addSubV];
+    [self setVAction];
+    self.showType = 0;
+    [self setShowViewState];
+    self.view.backgroundColor = _FFF8F9;
+}
+
+- (void)setVAction {
+    __weak typeof(self) weakSelf = self;
+    self.emailV.btnClick = ^(NSString *emailAddr){
+        [weakSelf.view endEditing:true];
+        weakSelf.email = emailAddr;
+        
+        [weakSelf showEmailTipAlert];
+    };
+    self.codeV.resendBtnClick = ^{
+        [weakSelf.view endEditing:true];
+        [weakSelf reqNet_forgotPassWord];
+    };
+    self.codeV.noReceiveClick = ^{
+        [weakSelf.view endEditing:true];
+        weakSelf.showType = 0;
+        [weakSelf setShowViewState];
+    };
+    self.codeV.subBtnClick = ^(NSString *codeStr){
+        [weakSelf.view endEditing:true];
+        weakSelf.code = codeStr;
+        weakSelf.showType = 2;
+        [weakSelf setShowViewState];
+    };
+    
+    self.passV.btnClick = ^(NSString * _Nonnull passStr) {
+        [weakSelf.view endEditing:true];
+        weakSelf.pass = passStr;
+        [weakSelf reqNet_reSetPassWord];
+    };
+}
+
+- (void)addSubV{
+    self.customNavBar.hidden = true;
+    self.navigationController.navigationBar.hidden = YES;
+    [self.view addSubview:self.scrollview];
+    UIButton *closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    [closeBtn setImage:[UIImage imageNamed:@"login_close_black"] forState:UIControlStateNormal];
+    [closeBtn addTarget:self action:@selector(action_back) forControlEvents:UIControlEventTouchUpInside];
+    [self.view addSubview:closeBtn];
+    [closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(@(IPHONEX ? 44 : 20));
+        make.centerX.equalTo(self.view);
+        make.width.height.equalTo(@50);
+    }];
+    
+    
+    UIImage *logoImg = [UIImage imageNamed:@"name_icon"];
+    UIImageView *bottomImgV = [[UIImageView alloc]initWithImage:logoImg];
+    [self.view addSubview:bottomImgV];
+    [bottomImgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-25);
+        make.centerX.equalTo(self.view);
+        make.width.equalTo(@104);
+        make.height.equalTo(@32);
+    }];
+    
+    [self.scrollview mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(closeBtn.mas_bottom);
+        make.leading.trailing.equalTo(self.view);
+        make.bottom.equalTo(bottomImgV.mas_top);
+    }];
+    
+    [self.scrollview addSubview:self.emailV];
+    [self.scrollview addSubview:self.passV];
+    [self.scrollview addSubview:self.codeV];
+    [self.emailV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.scrollview);
+        make.width.equalTo(self.view);
+    }];
+    [self.passV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.scrollview);
+        make.width.equalTo(self.view);
+    }];
+    [self.codeV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.scrollview);
+        make.width.equalTo(self.view);
+    }];
+
+    
+}
+
+- (void)showEmailTipAlert {
+    NSString *tipStr = [NSString stringWithFormat:@"Please check the verification code by %@.", self.email];
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:tipStr preferredStyle:UIAlertControllerStyleAlert];
+    __weak typeof(self) weakSelf = self;
+    UIAlertAction *sureAc = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [alert dismissViewControllerAnimated:true completion:nil];
+        [weakSelf reqNet_forgotPassWord];
+    }];
+    [alert addAction:sureAc];
+    [self presentViewController:alert animated:true completion:nil];
+}
+
+
+- (void)setShowViewState {
+    switch (self.showType) {
+        case 1:
+            self.passV.hidden = true;
+            self.codeV.hidden = false;
+            self.emailV.hidden = true;
+            break;
+        case 2:
+            self.passV.hidden = false;
+            self.codeV.hidden = true;
+            self.emailV.hidden = true;
+            break;
+        default:
+            self.passV.hidden = true;
+            self.codeV.hidden = true;
+            self.emailV.hidden = false;
+            break;
+    }
+}
+
+
+-(void)action_back{
+    if (self.showType == 1) {
+        self.showType = 0;
+        [self setShowViewState];
+        return;
+    }
+    if (self.showType == 2) {
+        self.showType = 1;
+        [self setShowViewState];
+        return;
+    }
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+-(void)action_submitClick{
+    if (![Current_normalTool xxx_isValidateEmail:self.email]) {
+        [self.view makeToast:@"Please prvide an email address." duration:2 position:CSToastPositionCenter];
+        return;
+    }
+    [self reqNet_forgotPassWord];
+}
+
+
+#pragma mark - **************** reqNet ****************
+
+-(void)reqNet_forgotPassWord{
+    if (self.email == nil || self.email.isEmpty) {
+        return;
+    }
+    __weak typeof(self) weakSelf = self;
+    [ASNetTools.shared postWithPath:postEmailCode param:@{@"email":self.email} success:^(id _Nonnull json) {
+        if (weakSelf.showType != 1) {
+            weakSelf.codeV.emailAddr = self.email;
+            weakSelf.showType = 1;
+            [weakSelf setShowViewState];
+        }
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        [self.view makeToast:msg duration:2 position:CSToastPositionCenter];
+    }];
+    
+    
+}
+-(void)reqNet_reSetPassWord{
+    if (self.email == nil || self.email.isEmpty) {
+        return;
+    }
+    __weak typeof(self) weakSelf = self;
+    NSMutableDictionary *param = [NSMutableDictionary dictionary];
+    [param setValue:self.email forKey:@"email"];
+    [param setValue:self.code forKey:@"code"];
+    [param setValue:self.pass forKey:@"newPassword"];
+    [ASNetTools.shared postWithPath:postResetPass param:param success:^(id _Nonnull json) {
+        [[UIApplication sharedApplication].windows.firstObject makeToast:@"Success"];
+        [weakSelf.navigationController popViewControllerAnimated:YES];
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        [weakSelf.view makeToast:msg duration:2 position:CSToastPositionCenter];
+        if ([code isEqualToString:@"100"]) {
+            weakSelf.showType = 1;
+            weakSelf.pass = @"";
+            [weakSelf.passV clearPass];
+            [weakSelf setShowViewState];
+        }
+    }];
+    
+    
+}
+
+- (UIScrollView *)scrollview {
+    if (!_scrollview) {
+        _scrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
+    }
+    return _scrollview;
+}
+
+- (APPassForgetCodeV *)codeV {
+    if (!_codeV) {
+        APPassForgetCodeV *v = [[APPassForgetCodeV alloc] initWithFrame:self.scrollview.bounds];
+        _codeV = v;
+    }
+    return _codeV;
+}
+
+- (APPassForgetEmailV *)emailV {
+    if (!_emailV) {
+        APPassForgetEmailV *v = [[APPassForgetEmailV alloc] initWithFrame:self.scrollview.bounds];
+        _emailV = v;
+    }
+    return _emailV;
+}
+
+- (APPassForgetNewPassV *)passV {
+    if (!_passV) {
+        APPassForgetNewPassV *v = [[APPassForgetNewPassV alloc] initWithFrame:self.scrollview.bounds];
+        _passV = v;
+    }
+    return _passV;
+}
+
+
+
+
+
+@end

+ 4 - 0
Asteria/NetTools/ASNetApis.h

@@ -87,4 +87,8 @@
 #define postTakeExtraPoints BaseRequestrUrl(@"points/more")
 
 
+// MARK: - 忘记密码
+#define postEmailCode BaseRequestrUrl(@"email/send")
+#define postResetPass BaseRequestrUrl(@"app/customer/password")
+
 #endif /* ASNetApis_h */