Переглянути джерело

Merge branch 'master' of http://gogs.hnwmzp.cn/nzk1/Asteria-APP

Abel 1 рік тому
батько
коміт
091c637ac2

+ 1 - 1
Asteria/ASUI/CustomView/productView/ASProductItemView.h

@@ -9,7 +9,7 @@
 #import "ASProductBaseModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
-static CGFloat productHWithOutImg = 102;
+static CGFloat productHWithOutImg = 102 - 22;
 @interface ASProductItemView : UIView
 
 @property (nonatomic, strong) UILabel *titleLb;

+ 9 - 9
Asteria/ASUI/CustomView/productView/ASProductItemView.m

@@ -24,7 +24,7 @@
     _model = model;
     [self.imgV sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"product_defualtImg"]];
     self.titleLb.text = model.title;
-    self.hotLb.text = [NSString stringWithFormat:@"SOLD %@", model.sale_num];
+//    self.hotLb.text = [NSString stringWithFormat:@"SOLD %@", model.sale_num];
     
     self.nowPriceLb.text = model.nowPrice;
     if ([model.oldPrice isEqualToString:@""] || [model.oldPrice isEqualToString:model.nowPrice]) {
@@ -62,7 +62,7 @@
     
     [self addSubview:self.imgV];
     [self addSubview:self.titleLb];
-    [self addSubview:self.hotLb];
+//    [self addSubview:self.hotLb];
     [self addSubview: self.nowPriceLb];
     [self addSubview: self.oldPriceLb];
     [self addSubview:self.addCartBt];
@@ -77,16 +77,16 @@
         make.leading.equalTo(self).offset(10);
         make.trailing.equalTo(self).offset(-10);
     }];
-    [self.hotLb mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.leading.equalTo(self.titleLb);
-        make.top.equalTo(self.titleLb.mas_bottom).offset(7);
-        make.trailing.equalTo(self.titleLb);
-        make.height.equalTo(@14);
-    }];
+//    [self.hotLb mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.leading.equalTo(self.titleLb);
+//        make.top.equalTo(self.titleLb.mas_bottom).offset(7);
+//        make.trailing.equalTo(self.titleLb);
+//        make.height.equalTo(@14);
+//    }];
     [self.nowPriceLb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     [self.nowPriceLb mas_makeConstraints:^(MASConstraintMaker *make) {
         make.leading.equalTo(self.titleLb);
-        make.top.greaterThanOrEqualTo(self.hotLb.mas_bottom).offset(11);
+        make.top.greaterThanOrEqualTo(self.titleLb.mas_bottom).offset(11);
         make.height.equalTo(@17);
         make.bottom.equalTo(self.mas_bottom).offset(-9);
     }];

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

@@ -256,7 +256,7 @@
                 [self.TableV.infodata addObject:self.totalCellM];
                 
                 MyCartPayTypeCellData *data = [[MyCartPayTypeCellData alloc]init];
-                data.final_prices_f = [model.subtotal floatValue];
+                data.final_prices_f = [model.grand_total floatValue];
                 data.currency_symbol = model.currency_symbol;
                 [self.TableV.infodata addObject:data];
                 

+ 6 - 5
Asteria/Fuction/Cart/Cell/MyCartItemCell.m

@@ -73,14 +73,15 @@
         make.width.height.mas_equalTo(86);
     }];
     [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.right.top.mas_equalTo(0);
-        make.width.height.mas_offset(40);
+        make.top.mas_equalTo(0);
+        make.right.mas_equalTo(-5);
+        make.width.height.mas_offset(22);
     }];
     [self.nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(0);
+        make.top.mas_equalTo(4);
         make.left.equalTo(self.leftImg.mas_right).offset(10);
         make.right.equalTo(self.closeBtn.mas_left).offset(-10);
-        make.height.mas_equalTo(36);
+        make.height.mas_lessThanOrEqualTo(40);
     }];
     [self.optionsLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.nameLab.mas_bottom).offset(10);;
@@ -229,7 +230,7 @@
 -(UIButton *)closeBtn{
     if(!_closeBtn){
         _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-        [_closeBtn setImage:[UIImage imageNamed:@"base_close_black"] forState:UIControlStateNormal];
+        [_closeBtn setBackgroundImage:[UIImage imageNamed:@"base_close_black"] forState:UIControlStateNormal];
         [_closeBtn addTarget:self action:@selector(handle_CloseEvent:) forControlEvents:UIControlEventTouchUpInside];
     }
     return _closeBtn;

+ 6 - 5
Asteria/Fuction/Cart/Checkout/ASCheckoutGoodsItemCell.m

@@ -76,14 +76,15 @@
         make.width.height.mas_equalTo(86);
     }];
     [self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.right.top.mas_equalTo(0);
-        make.width.height.mas_offset(40);
+        make.top.mas_equalTo(0);
+        make.right.mas_equalTo(-5);
+        make.width.height.mas_offset(22);
     }];
     [self.nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(0);
+        make.top.mas_equalTo(4);
         make.left.equalTo(self.leftImg.mas_right).offset(10);
         make.right.equalTo(self.closeBtn.mas_left).offset(-10);
-        make.height.mas_equalTo(36);
+        make.height.mas_lessThanOrEqualTo(40);
     }];
     [self.optionsLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.nameLab.mas_bottom).offset(10);;
@@ -232,7 +233,7 @@
 -(UIButton *)closeBtn{
     if(!_closeBtn){
         _closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-        [_closeBtn setImage:[UIImage imageNamed:@"base_close_black"] forState:UIControlStateNormal];
+        [_closeBtn setBackgroundImage:[UIImage imageNamed:@"base_close_black"] forState:UIControlStateNormal];
         [_closeBtn addTarget:self action:@selector(handle_CloseEvent:) forControlEvents:UIControlEventTouchUpInside];
     }
     return _closeBtn;

+ 1 - 1
Asteria/Fuction/Cart/V/ASMyCartNoDataView.m

@@ -67,7 +67,7 @@
 }
 
 - (void)_btnClick {
-    
+    [Fuction_Tool popToHomeVc];
 }
 
 - (UIView *)emptyV {

+ 0 - 2
Asteria/Fuction/Category/vc/ASCategoryViewController.m

@@ -173,8 +173,6 @@
 }
 
 
-
-
 -(UIView *)bottomV {
     if (!_bottomV) {
         UIView *v = [[UIView alloc] init];

+ 12 - 1
Asteria/Fuction/Goods/V/ASGoodsGuaranteeInfoCell.m

@@ -24,6 +24,8 @@
 
 - (void)setupSubviewS{
     
+    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(setData) name:GoodsDetailsUpdatePrice object:nil];
+    
     _radioBtnAry = [[NSMutableArray alloc] initWithCapacity:1];
     
     [self.contentView addSubview:self.datails_payV];
@@ -78,12 +80,21 @@
 
 }
 
+- (void)setData {
+    [self configData:self.infoModel];
+}
+
 - (void)configData:(id)Data{
     GoodsInformationM *model = (GoodsInformationM *)Data;
     
     _infoModel = model;
     
-    self.datails_payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,[model.final_prices floatValue]/4];
+    NSString *discountPrice = model.show_final_prices;
+    if (!AS_String_valid(model.show_final_prices) || [model.show_final_prices isEqualToString:@"0"]) {
+        discountPrice = model.final_prices;
+    }
+    
+    self.datails_payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,[discountPrice floatValue]/4];
 }
 
 -(void)_onButtonClick:(UIButton *)btn{

+ 1 - 1
Asteria/Fuction/Goods/VM/ASGoodsDetailsVM.m

@@ -45,7 +45,7 @@
         return  priceAtr;
     }else{
         [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@"  "]];
-        NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",model.price]];
+        NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@", model.currency_symbol, model.price]];
         [priceAtrSub1 addAttribute:NSForegroundColorAttributeName
                         value:[UIColor colorWithHexString:@"#8c8c8c"]
                         range:NSMakeRange(0, priceAtrSub1.length)];

+ 1 - 1
Asteria/Fuction/Home/vm/ASHomeViewModel.m

@@ -44,7 +44,7 @@
 
 -(void)getHomeListData:(btnClickBlock)success {
     __weak typeof(self) weakSelf = self;
-    [ASNetTools.shared getMsgWithPath:HomeList param:@{} success:^(id _Nonnull json) {
+    [ASNetTools.shared getMsgWithPath:HomeList param:@{@"currency_code":ASCurrencyManager.shared.currentCur} success:^(id _Nonnull json) {
         NSLog(@"------url:%@---json:%@------", HomeList, json);
         NSMutableArray *arr = [ASHomeMainListModel mj_objectArrayWithKeyValuesArray:json];
         weakSelf.listData = arr;

+ 3 - 1
Asteria/Fuction/Login/VC/AS_LoginC.m

@@ -62,11 +62,13 @@
     
     
     
-    self.xxx_emailTFV.mj_y = CGRectGetMaxY(Hi_imgV.frame)+35;
+    self.xxx_emailTFV.mj_y = CGRectGetMaxY(Hi_imgV.frame) + 35;
     self.xxx_passwordV.frame = CGRectFlatMake(20, CGRectGetMaxY(self.xxx_emailTFV.frame)+30, KScreenWidth-40, 50+20);
     self.xxx_logInBtn.frame = CGRectMake(20, CGRectGetMaxY(self.xxx_passwordV.frame)+10, KScreenWidth-40, 45);
     self.xxx_authV.mj_y = CGRectGetMaxY(self.xxx_logInBtn.frame)+30;
     bottomV.mj_y = CGRectGetMaxY(self.xxx_authV.frame)+30;
+    
+    self.scrollview.contentSize = CGSizeMake(KScreenWidth, CGRectGetMaxY(self.xxx_authV.frame) + 30 + 46 + 34);
 }
 
 

+ 7 - 2
Asteria/Fuction/Login/VC/AS_SignUpC.m

@@ -26,18 +26,23 @@
 
 - (void)initSubviews{
     [super initSubviews];
+    
     [self.view addSubview:self.scrollview];
+    
     UIView *logNav = [self logNavView];
     [self.scrollview addSubview:logNav];
+    
     UIImageView *Hi_imgV = [[UIImageView alloc]init];
     UIImage *hiImg = [UIImage imageNamed:@"login_signup"];
     Hi_imgV.image = hiImg;
     [self.scrollview addSubview:Hi_imgV];
+    
     [self.scrollview addSubview:self.xxx_signUpV];
     Hi_imgV.frame = CGRectMake(20, CGRectGetMaxY(logNav.frame)+30, KScreenWidth-40, hiImg.size.height/hiImg.size.width*(KScreenWidth-40));
     self.xxx_signUpV.frame = CGRectMake(0, CGRectGetMaxY(Hi_imgV.frame)+30, KScreenWidth, 500);
     [self.xxx_signUpV sizeToFit];
-    NSLog(@"------%@",self.xxx_signUpV);
+    
+    self.scrollview.contentSize = CGSizeMake(KScreenWidth, CGRectGetMaxY(self.xxx_signUpV.frame) + 34);
 }
 - (void)ucm_subVeiwsTapBlock{
     @weakify(self)
@@ -51,7 +56,7 @@
     [ASNetTools.shared postWithPath:BaseRequestrUrl(@"customers") param:dic success:^(id _Nonnull json) {
         @weakify(self)
         NSMutableDictionary *logDic = [NSMutableDictionary dictionary];
-        logDic[@"password"] =dic[@"password"];
+        logDic[@"password"] = dic[@"password"];
         logDic[@"username"] = dic[@"customer"][@"email"];
         [ASNetTools xxx_loginWithParam:logDic success:^(id _Nonnull result) {
             [MBProgressHUD hideHUDForView:self.view animated:YES];

+ 3 - 0
Asteria/NetTools/ASNetTools.m

@@ -539,6 +539,9 @@
                     NSString *msg = result[@"msg"];
                     faild(status, msg);
                 }
+            } else {
+                NSString *msg = @"failed";
+                faild(0, msg);
             }
             
         });