“wangdongchao” 1 éve
szülő
commit
b6c79c89d3

+ 1 - 1
Asteria/Fuction/Cart/Cart_CheckoutC.m

@@ -674,7 +674,7 @@
             }
         };
         _addGiftView.hidden = YES;
-        [[UIApplication sharedApplication].keyWindow addSubview:_addGiftView];
+        [[UIApplication sharedApplication].windows.firstObject addSubview:_addGiftView];
     }
     return _addGiftView;
 }

+ 11 - 6
Asteria/Fuction/Cart/Checkout/ASCheckoutPointApplyCell.m

@@ -49,6 +49,7 @@
     [applyTmpV addSubview:self.applyBtn];
     
     [self.bgView addSubview:self.pointDesLab];
+    [self.bgView addSubview:self.priceLab];
     
     [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.top.mas_equalTo(10);
@@ -63,11 +64,7 @@
         make.right.mas_equalTo(-100);
     }];
     
-    _priceLab = [UILabel labelCreateWithText:@"" font:[UIFont fontWithName:Rob_Bold size:14] textColor:_0B0B0B];
-    _priceLab.textAlignment = NSTextAlignmentRight;
-    _priceLab.adjustsFontSizeToFitWidth = YES;
-    [self.bgView addSubview:_priceLab];
-    [_priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
+    [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.titleLab.mas_right).offset(20);
         make.right.mas_equalTo(-10);
         make.centerY.mas_equalTo(self.titleLab);
@@ -127,7 +124,7 @@
         self.applyBtn.selected = NO;
     }
     
-    _priceLab.text = [NSString stringWithFormat:@"-%@%@", model.priceSymbol, model.usePrice];
+    self.priceLab.text = [NSString stringWithFormat:@"-%@%@", model.priceSymbol, model.usePrice];
     
     NSString *pointStr = [NSString stringWithFormat:@"You have %@ Reward Points available.", model.pointBalance];
     NSString *pointLastStr = [NSString stringWithFormat:@"%@ point = %@%@. Input points value below to redeem.", model.pointScale, model.priceSymbol, model.priceScale];
@@ -191,6 +188,14 @@
     return _applyBtn;
 }
 
+-(UILabel *)priceLab{
+    if(!_priceLab){
+        _priceLab = [UILabel labelCreateWithText:@"" font:[UIFont fontWithName:Rob_Bold size:14] textColor:_0B0B0B];
+        _priceLab.textAlignment = NSTextAlignmentRight;
+        _priceLab.adjustsFontSizeToFitWidth = YES;
+    }
+    return _priceLab;
+}
 
 -(QMUILabel *)pointDesLab{
     if(!_pointDesLab){

+ 40 - 20
Asteria/Fuction/Cart/Checkout/ASCheckoutTopView.m

@@ -9,49 +9,69 @@
 
 @implementation ASCheckoutTopView
 
-- (instancetype)initWithFrame:(CGRect)frame {
-    if (self = [super initWithFrame:frame]) {
-        self.backgroundColor = ThemeLightColor;
-        
+- (UILabel *)countLab {
+    if (!_countLab) {
         _countLab = [[UILabel alloc] init];
         _countLab.textColor = _0B0B0B;
         _countLab.text = @"show order items";
         _countLab.font = [UIFont fontWithName:Rob_Bold size:16];
-        [self addSubview:_countLab];
-        [_countLab mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.mas_equalTo(20);
-            make.centerY.equalTo(self);
-        }];
-        
+    }
+    return _countLab;
+}
+
+- (UIButton *)arrowBtn {
+    if (!_arrowBtn) {
         _arrowBtn = [UIButton buttonWithType:UIButtonTypeCustom];
         [_arrowBtn setImage:[UIImage imageNamed:@"checkout_arrow_up"] forState:UIControlStateNormal];
         [_arrowBtn setImage:[UIImage imageNamed:@"checkout_arrow_down"] forState:UIControlStateSelected];
         _arrowBtn.titleLabel.font = [UIFont fontWithName:Rob_Bold size:12];
         [_arrowBtn addTarget:self action:@selector(_isFlodClick:) forControlEvents:UIControlEventTouchUpInside];
         [_arrowBtn setTitleColor:_0B0B0B forState:0];
-        [self addSubview:_arrowBtn];
-        [_arrowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+    }
+    return _arrowBtn;
+}
+
+- (UILabel *)priceLab {
+    if (!_priceLab) {
+        _priceLab = [[UILabel alloc] init];
+        _priceLab.textColor = _0B0B0B;
+        _priceLab.font = [UIFont fontWithName:Rob_Bold size:16];
+    }
+    return _priceLab;
+}
+
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    if (self = [super initWithFrame:frame]) {
+        self.backgroundColor = ThemeLightColor;
+        
+        [self addSubview:self.countLab];
+        [self addSubview:self.arrowBtn];
+        [self addSubview:self.priceLab];
+        
+        [self.countLab mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(20);
+            make.centerY.equalTo(self);
+        }];
+        
+        [self.arrowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
             make.right.mas_equalTo(-12);
             make.centerY.equalTo(self);
             make.width.mas_equalTo(35);
             make.height.mas_equalTo(32);
         }];
         
-        _priceLab = [[UILabel alloc] init];
-        _priceLab.textColor = _0B0B0B;
-        _priceLab.font = [UIFont fontWithName:Rob_Bold size:16];
-        [self addSubview:_priceLab];
-        [_priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.right.equalTo(_arrowBtn.mas_left).offset(-6);
+        [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.right.equalTo(self.arrowBtn.mas_left).offset(-6);
             make.centerY.equalTo(self);
         }];
     }
     return self;
 }
 - (void)setTopViewData:(NSString *)itemCount price:(NSString *)priceStr {
-    _countLab.text = [NSString stringWithFormat:@"show order items (%@)", AS_String_valid(itemCount) ? AS_String_NotNull(itemCount) : @"0"];
+    self.countLab.text = [NSString stringWithFormat:@"show order items (%@)", AS_String_valid(itemCount) ? AS_String_NotNull(itemCount) : @"0"];
     
-    _priceLab.text = priceStr;
+    self.priceLab.text = priceStr;
 }
 
 - (void)_isFlodClick:(UIButton *)button {

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

@@ -14,7 +14,7 @@
 #import "AS_SignUpC.h"
 #import "LoginForgotC.h"
 
-#import "LoginBindingC.h"
+#import "ASLoginBindingC.h"
 
 
 
@@ -178,7 +178,7 @@
         K_STRONG_SELF;
         [MBProgressHUD hideHUDForView:self.view animated:YES];
         
-        LoginBindingC *bindVC = [[LoginBindingC alloc] init];
+        ASLoginBindingC *bindVC = [[ASLoginBindingC alloc] init];
         bindVC.modalPresentationStyle = UIModalPresentationFullScreen;
         K_WEAK_SELF;
         bindVC.bindFinishBlock = ^(NSDictionary * _Nonnull bindInfo) {