Explorar el Código

fix;bug修改

“wangdongchao” hace 1 año
padre
commit
d0451855c8
Se han modificado 29 ficheros con 150 adiciones y 64 borrados
  1. 1 1
      Asteria/ASUI/CustomView/productView/ASProductItemView.h
  2. 33 15
      Asteria/ASUI/CustomView/productView/ASProductItemView.m
  3. 3 3
      Asteria/Common/V/GoodsDetailsPayV.m
  4. 1 0
      Asteria/Fuction/Cart/Cart_CheckoutC.m
  5. 5 1
      Asteria/Fuction/Cart/Cart_MyCartC.m
  6. 2 2
      Asteria/Fuction/Cart/Cell/MyCartItemCell.m
  7. 1 1
      Asteria/Fuction/Cart/Checkout/ASCheckoutGoodsItemCell.m
  8. 1 1
      Asteria/Fuction/Cart/Checkout/ASCheckoutShipMethodCell.m
  9. 1 1
      Asteria/Fuction/Cart/M/CartTotalsM.h
  10. 1 1
      Asteria/Fuction/Cart/PayManager/ASCheckoutPayManager.m
  11. 22 0
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/Contents.json
  12. BIN
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/goods_alertv_klarna@2x.png
  13. BIN
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/goods_alertv_klarna@3x.png
  14. 22 0
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/Contents.json
  15. BIN
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/组 11352@2x.png
  16. BIN
      Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/组 11352@3x.png
  17. 9 2
      Asteria/Fuction/Goods/V/Banner/WKM_goodsBanner.m
  18. 2 2
      Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.m
  19. 12 9
      Asteria/Fuction/Goods/VC/AS_GoodsSizeC.m
  20. 4 4
      Asteria/Fuction/Goods/VM/ASGoodsDetailsVM.m
  21. 1 3
      Asteria/Fuction/Home/ASProductListViewController.m
  22. 2 0
      Asteria/Fuction/Home/Models/KWProductListFilterModel.h
  23. 3 7
      Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m
  24. 5 5
      Asteria/Fuction/Login/VC/AS_LoginC.m
  25. 9 0
      Asteria/Fuction/UserCenter/UserCenterHome/ASUserCenterViewController.m
  26. 1 0
      Asteria/Fuction/UserCenter/UserCenterHome/views/ASSginView.m
  27. 5 3
      Asteria/Fuction/UserCenter/UserCenterHome/views/KWMineMoreProductsCell.m
  28. 1 0
      Asteria/NetTools/ASNetApis.h
  29. 3 3
      Asteria/NetTools/ASNetTools.m

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

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

+ 33 - 15
Asteria/ASUI/CustomView/productView/ASProductItemView.m

@@ -28,18 +28,33 @@
     
     self.nowPriceLb.text = model.nowPrice;
     if ([model.oldPrice isEqualToString:@""] || [model.oldPrice isEqualToString:model.nowPrice]) {
-        [self.oldPriceLb setHidden:true];
+//        [self.oldPriceLb setHidden:true];
+        self.nowPriceLb.text = model.nowPrice;
     } else {
-        [self.oldPriceLb setHidden:false];
-        NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",model.oldPrice]];
+//        [self.oldPriceLb setHidden:false];
+        
+        CGRect rect1 = [model.nowPrice boundingRectWithSize:CGSizeMake(MAXFLOAT, 22) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont fontWithName:Rob_Bold size:14]} context:nil];
+        CGRect rect2 = [model.oldPrice boundingRectWithSize:CGSizeMake(MAXFLOAT, 20) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:12]} context:nil];
+        
+        NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@", model.nowPrice, model.oldPrice]];
+        if (rect1.size.width + rect2.size.width + 5 > (KScreenWidth - 30)/2 - 20 - 24) {
+            attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n%@", model.nowPrice, model.oldPrice]];
+        }
+        
         [attStr addAttributes:@{
             NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:12],
             NSStrikethroughStyleAttributeName:@(NSUnderlineStyleSingle),
             NSStrikethroughColorAttributeName:Col_999,
             NSForegroundColorAttributeName:Col_999,
-        } range:NSMakeRange(0, attStr.length)];
+        } range:NSMakeRange(model.nowPrice.length + 1, model.oldPrice.length)];
+        
+//        CGRect  rect = [attStr  boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil];
+        
         
-        self.oldPriceLb.attributedText = attStr;
+        
+        self.nowPriceLb.attributedText = attStr;
+        
+//        self.nowPriceLb.text = model.nowPrice;
     }
     
 }
@@ -64,7 +79,7 @@
     [self addSubview:self.titleLb];
 //    [self addSubview:self.hotLb];
     [self addSubview: self.nowPriceLb];
-    [self addSubview: self.oldPriceLb];
+//    [self addSubview: self.oldPriceLb];
     [self addSubview:self.addCartBt];
     
     [self.imgV mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -86,21 +101,22 @@
     [self.nowPriceLb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     [self.nowPriceLb mas_makeConstraints:^(MASConstraintMaker *make) {
         make.leading.equalTo(self.titleLb);
-        make.top.greaterThanOrEqualTo(self.titleLb.mas_bottom).offset(11);
-        make.height.equalTo(@17);
-        make.bottom.equalTo(self.mas_bottom).offset(-9);
+        make.top.equalTo(self.titleLb.mas_bottom).offset(4);
+        make.height.mas_equalTo(@34);
+        make.right.mas_equalTo(-36);
+        make.bottom.equalTo(self.mas_bottom).offset(-6);
     }];
     
-    [self.oldPriceLb mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.bottom.equalTo(self.nowPriceLb);
-        make.leading.equalTo(self.nowPriceLb.mas_trailing).offset(4);
-        make.height.equalTo(@16);
-    }];
+//    [self.oldPriceLb mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.bottom.equalTo(self.nowPriceLb);
+//        make.leading.equalTo(self.nowPriceLb.mas_trailing).offset(4);
+//        make.height.equalTo(@16);
+//    }];
     [self.addCartBt mas_makeConstraints:^(MASConstraintMaker *make) {
         make.width.height.equalTo(@24);
         make.trailing.equalTo(self).offset(-10);
         make.bottom.equalTo(self).offset(-10);
-        make.leading.greaterThanOrEqualTo(self.oldPriceLb.mas_trailing).offset(8);
+//        make.leading.greaterThanOrEqualTo(self.oldPriceLb.mas_trailing).offset(8);
     }];
     
     
@@ -132,6 +148,8 @@
     if (!_nowPriceLb) {
         UILabel *lb = [[UILabel alloc] init];
         lb.font = [UIFont fontWithName:Rob_Bold size:14];
+//        lb.adjustsFontSizeToFitWidth = YES;
+        lb.numberOfLines = 2;
         lb.textColor = [UIColor blackColor];
         lb.textAlignment = NSTextAlignmentLeft;
         _nowPriceLb = lb;

+ 3 - 3
Asteria/Common/V/GoodsDetailsPayV.m

@@ -13,7 +13,7 @@
 - (void)tt_setupViews{
     [self addSubview:self.titleLab];
     self.titleLab.frame = CGRectMake(10, 10, self.mj_w-20, 20);
-    NSArray *imgAry = @[@"goods_pay_paypal",@"goods_pay_afterpay"];
+    NSArray *imgAry = @[@"goods_pay_paypal",@"goods_pay_afterpay", @"goods_pay_klarna"];
     for (int i = 0; i<imgAry.count; i++) {
         NSString *imgstr = imgAry[i];
         UIButton *payBtn = [UIButton buttonWithType:UIButtonTypeCustom];
@@ -26,8 +26,8 @@
 }
 
 -(void)pay_payBtnType:(UIButton *)btn{
-    NSArray *alertvImgAry = @[@"goods_alertv_paypal",@"goods_alertv_afterpay"];
-    NSArray *closeImgAry = @[@"base_close_white",@"base_close_black"];
+    NSArray *alertvImgAry = @[@"goods_alertv_paypal",@"goods_alertv_afterpay",@"goods_alertv_klarna"];
+    NSArray *closeImgAry = @[@"base_close_white",@"base_close_black",@"base_close_black"];
     AlertMyCartDeleteV *payAlertV = [[AlertMyCartDeleteV alloc]initWithPaytypeAlertV:[UIImage imageNamed:alertvImgAry[btn.tag-GoodsInfoPayTypeTag]] closeBtnImg:[UIImage imageNamed:closeImgAry[btn.tag-GoodsInfoPayTypeTag]]];
     [payAlertV alertv_show];
     

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

@@ -191,6 +191,7 @@
                         //默认设置第一个运输方式
                         [self requestSetShipMethodByAddress];
                     }
+                    [self requestAddBillingAddress];
                 }
             }
             //首次进入展示购物车数据UI

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

@@ -241,7 +241,7 @@
                 self.postBtn.hidden = NO;
                 
                 self.top_totalLab.text = [NSString stringWithFormat:@"%@ pcs | total",model.items_qty];
-                self.top_priceLab.text =[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.subtotal];
+                self.top_priceLab.text =[NSString stringWithFormat:@"%@%.2f",model.currency_symbol, [model.subtotal floatValue]];
                 [self.TableV.infodata removeAllObjects];
                 self.TableV.infodata = [NSMutableArray arrayWithArray:model.items];
                 
@@ -280,6 +280,8 @@
                 
                 
             } else {
+                
+                self.cartTabbarItem.qmui_badgeInteger = 0;
                 //空页面
                 self.noDataView.hidden = NO;
                 self.TableV.hidden = YES;
@@ -288,6 +290,8 @@
             }
             
         } else {
+            
+            self.cartTabbarItem.qmui_badgeInteger = 0;
             //空页面
             self.noDataView.hidden = NO;
             self.TableV.hidden = YES;

+ 2 - 2
Asteria/Fuction/Cart/Cell/MyCartItemCell.m

@@ -153,7 +153,7 @@
         self.bgDesLab.hidden = YES;
     }else{
         self.bgDesLab.hidden = NO;
-        self.bgDesLab.text = [NSString stringWithFormat:@"SAVE %@%.2f",itemM.currency_symbol,[itemM.initial_price floatValue]-[itemM.row_total floatValue]];
+        self.bgDesLab.text = [NSString stringWithFormat:@"SAVE %@%.2f",itemM.currency_symbol,[itemM.initial_price floatValue]-[itemM.price_incl_tax floatValue]];
         self.countV.numLab.text = MM_str(itemM.qty);
         [self.countV xxx_changeBtnIsEnable:YES num:[self.countV.numLab.text integerValue]];
     }
@@ -172,7 +172,7 @@
 }
 #pragma mark - **************** tool ****************
 +(NSMutableAttributedString *)tool_changePriceAtr:(CartTotalsItemsM *)model{
-    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.row_total]];
+    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.price_incl_tax]];
     [priceAtr addAttribute: NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#0B0B0B"] range:NSMakeRange(0, priceAtr.length)];
     [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:20] range:NSMakeRange(0, priceAtr.length)];
     [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@"  "]];

+ 1 - 1
Asteria/Fuction/Cart/Checkout/ASCheckoutGoodsItemCell.m

@@ -175,7 +175,7 @@
 }
 #pragma mark - **************** tool ****************
 +(NSMutableAttributedString *)tool_changePriceAtr:(CartTotalsItemsM *)model{
-    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.row_total]];
+    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.price_incl_tax]];
     [priceAtr addAttribute: NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#0B0B0B"] range:NSMakeRange(0, priceAtr.length)];
     [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:20] range:NSMakeRange(0, priceAtr.length)];
     [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@"  "]];

+ 1 - 1
Asteria/Fuction/Cart/Checkout/ASCheckoutShipMethodCell.m

@@ -151,7 +151,7 @@
 - (void)setShipItemData:(ASCheckoutShipMethodModel *)shipModel symbol:(NSString *)symbol {
     
     self.shipMethodLab.text = [NSString stringWithFormat:@"%@ %@", AS_String_NotNull(shipModel.method_title), AS_String_NotNull(shipModel.carrier_title)];
-    self.shipPriceLab.text = [NSString stringWithFormat:@"%@%@", symbol, shipModel.amount];
+    self.shipPriceLab.text = [NSString stringWithFormat:@"%@%.2f", symbol, [shipModel.amount floatValue]];
     
     self.selectBtn.selected = shipModel.isSelect;
 }

+ 1 - 1
Asteria/Fuction/Cart/M/CartTotalsM.h

@@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *initial_price;
 @property (nonatomic, copy) NSString *image;
 @property (nonatomic, copy) NSString *product_id;
-@property (nonatomic, copy) NSString *row_total;
+@property (nonatomic, copy) NSString *price_incl_tax;
 
 
 @property (nonatomic, assign) BOOL isGift;

+ 1 - 1
Asteria/Fuction/Cart/PayManager/ASCheckoutPayManager.m

@@ -126,7 +126,7 @@ static ASCheckoutPayManager *_instance = nil;
     
     NSDictionary *requestParams = nil;
     if ([payid isEqualToString:@""]) {//货到付款方式
-        requestParams = @{@"paymentMethod":self.payType};
+        requestParams = @{@"paymentMethod":@{@"method":self.payType}};
     } else {//stripe支付
         NSDictionary *methodDic = @{@"payment_method":payid,
                                     @"manual_authentication":@"card",

+ 22 - 0
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/Contents.json

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

BIN
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/goods_alertv_klarna@2x.png


BIN
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_alertv_klarna.imageset/goods_alertv_klarna@3x.png


+ 22 - 0
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/Contents.json

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

BIN
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/组 11352@2x.png


BIN
Asteria/Fuction/Goods/Assets/Goods.xcassets/goods_pay_klarna.imageset/组 11352@3x.png


+ 9 - 2
Asteria/Fuction/Goods/V/Banner/WKM_goodsBanner.m

@@ -91,10 +91,17 @@ UICollectionViewDelegate>
     for (GoodsBannerModel *tmpModel in self.dataAry) {
         if (tmpModel.cellType == CellContentTypeImg){
             [imgAry addObject:tmpModel.url];
+        } else {
+            [imgAry addObject:tmpModel.small];
         }
     }
     if (model.cellType == CellContentTypeImg) {
-        [self tool_PhotosBroweserImages:imgAry index:index-(self.dataAry.count-imgAry.count)];
+        
+        NSInteger atIndex = index - (self.dataAry.count-imgAry.count);
+        if (atIndex <= 0) {
+            atIndex = 0;
+        }
+        [self tool_PhotosBroweserImages:imgAry index:atIndex];
     }
 }
 
@@ -107,7 +114,7 @@ UICollectionViewDelegate>
 - (TYCyclePagerView *)BannerV {
     if (!_BannerV) {
         _BannerV = [[TYCyclePagerView alloc]init];
-        _BannerV.isInfiniteLoop = YES;
+        _BannerV.isInfiniteLoop = NO;
         _BannerV.dataSource = self;
         _BannerV.delegate = self;
         [_BannerV registerClass:[GoodsVideoCollectionViewCell class] forCellWithReuseIdentifier:GoodsVideoCollectionViewCellID];

+ 2 - 2
Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.m

@@ -164,8 +164,8 @@
         self.model.show_prices = [NSString stringWithFormat:@"%.2lf", show_prices];
     } else {
         //优惠价
-        discount = (100.00 - discount) / 100.00;
-        CGFloat add_final_price_f = (add_price * discount + [self.model.final_prices floatValue]) * num;
+        float discount1 = (100.00 - discount) / 100.00;
+        CGFloat add_final_price_f = (add_price * discount1 + [self.model.final_prices floatValue]) * num;
         self.model.show_final_prices = [NSString stringWithFormat:@"%.2lf", add_final_price_f];
         //原价
         CGFloat show_prices = (add_price + [self.model.price floatValue]) * num;

+ 12 - 9
Asteria/Fuction/Goods/VC/AS_GoodsSizeC.m

@@ -76,8 +76,8 @@
     [super initSubviews];
     [self.view addSubview:self.sel_headImg];
     [self.view addSubview:self.sel_titleLab];
-    [self.view addSubview:self.priceLab];
     [self.view addSubview:self.saveLab];
+    [self.view addSubview:self.priceLab];
     [self.view addSubview:self.bottomV];
 
     IPhoneXHeigh
@@ -95,16 +95,18 @@
         make.height.mas_equalTo(40);
     }];
     
+    [self.saveLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-10);
+        make.height.mas_equalTo(20);
+        make.centerY.equalTo(self.priceLab);
+    }];
+    
     [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.sel_headImg.mas_right).offset(10);
+        make.right.equalTo(self.saveLab.mas_left).offset(-4);
         make.bottom.equalTo(self.sel_headImg);
         make.height.mas_equalTo(24);
     }];
-    [self.saveLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.priceLab.mas_right).offset(10);
-        make.height.mas_equalTo(20);
-        make.centerY.equalTo(self.priceLab);
-    }];
     
     CGFloat tableVorgY = CGRectGetMaxY(self.sel_headImg.frame)+20;
     [self setupTableV:[GoodsSizeSelectTableV class] Frame:CGRectMake(0, tableVorgY, KScreenWidth, KScreenHeight-tableVorgY-self.bottomV.mj_h)];
@@ -122,7 +124,7 @@
     [self.sel_headImg sd_setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:UIImageDefaultImg_SD];
     self.sel_titleLab.text = model.name;
     self.priceLab.attributedText = [ASGoodsDetailsVM tool_changePriceAtr:model];
-    if(model.final_prices == model.price){
+    if([model.final_prices isEqualToString:model.price]){
         self.saveLab.hidden = YES;
     }else{
         self.saveLab.hidden = NO;
@@ -157,7 +159,7 @@
         add_price  =  add_price + valuesM.price;
     }
     
-    float discount = [self.model.percent floatValue];
+    float discount = 0;
     if (discount == 0) {
         //优惠价
         CGFloat add_final_price_f = (add_price + [self.model.final_prices floatValue]) * self.xxx_quantityNum;
@@ -272,7 +274,8 @@
         _priceLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
         _priceLab.textAlignment = NSTextAlignmentLeft;
         _priceLab.textColor = [UIColor blackColor];
-        _priceLab.font = [UIFont fontWithName:Rob_Bold size:18];
+        _priceLab.font = [UIFont fontWithName:Rob_Bold size:20];
+        _priceLab.adjustsFontSizeToFitWidth = YES;
     }
     return  _priceLab;
 }

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

@@ -38,14 +38,14 @@
     }
 }
 +(NSMutableAttributedString *)tool_changePriceAtr:(GoodsInformationM *)model{
-    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.final_prices]];
+    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%.2f",model.currency_symbol, [model.final_prices floatValue]]];
     [priceAtr addAttribute: NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#0B0B0B"] range:NSMakeRange(0, priceAtr.length)];
-    [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:20] range:NSMakeRange(0, priceAtr.length)];
+    [priceAtr addAttribute:NSFontAttributeName value:[UIFont fontWithName:Rob_Bold size:18] range:NSMakeRange(0, priceAtr.length)];
     if([model.final_prices floatValue] == [model.price floatValue]){
         return  priceAtr;
     }else{
-        [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@"  "]];
-        NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@", model.currency_symbol, model.price]];
+        [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@" "]];
+        NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%.2f", model.currency_symbol, [model.price floatValue]]];
         [priceAtrSub1 addAttribute:NSForegroundColorAttributeName
                         value:[UIColor colorWithHexString:@"#8c8c8c"]
                         range:NSMakeRange(0, priceAtrSub1.length)];

+ 1 - 3
Asteria/Fuction/Home/ASProductListViewController.m

@@ -480,9 +480,7 @@
     [self.vm getTopLinkList:^{
         [weakSelf.collectV reloadData];
     }];
-    
-    
-    
+
     
     [self.vm getProductListData:self.type page:self.page orderBy:self.currentSortType dir:@"DESC" com:^(BOOL hasNext, NSString * _Nonnull msg) {
         [MBProgressHUD hideHUDForView:weakSelf.view animated:true];

+ 2 - 0
Asteria/Fuction/Home/Models/KWProductListFilterModel.h

@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *attribute_name;
 @property (nonatomic, strong) NSMutableArray *attribute_data;
 
+@property (nonatomic, assign) BOOL isSelect;
+
 
 
 - (KWProductListFilterModel *)copySelf;

+ 3 - 7
Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m

@@ -55,7 +55,7 @@
     if (isKey) {
         self.titles = @[@"Popular",@"Price",@"Sold Quantity"];
     } else {
-        self.titles = @[@"Featured",@"Price:Low to Heigh", @"Price:Heigh to Low",@"Best Selling"];
+        self.titles = @[@"Featured",@"Price:Low to High", @"Price:High to Low",@"Best Selling"];
     }
     [self.tableV reloadData];
     [ASHomeAlertWindow showCustomVc:self position:ASAlertPositionBottom];
@@ -73,18 +73,14 @@
 }
 
 - (void)configSubV {
-    self.titles = @[@"Featured",@"Price:Low to Heigh", @"Price:Heigh to Low",@"Best Selling"];
+    self.titles = @[@"Featured",@"Price:Low to High", @"Price:High to Low",@"Best Selling"];
     self.currentIndex = 0;
     
     [self addSubview:self.topV];
     [self.topV addSubview:self.closeBt];
     [self addSubview:self.bottomV];
     [self.bottomV addSubview:self.tableV];
-    
-    
-    
-    
-    
+
     
     [self.topV mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.greaterThanOrEqualTo(self);

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

@@ -92,7 +92,7 @@
     [ASNetTools xxx_loginWithParam:params success:^(id _Nonnull result) {
         [MBProgressHUD hideHUDForView :self.view animated:YES];
         @weakify(self)
-        [self.view makeToast:@"Login Suecess" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
+        [self.view makeToast:@"Login Success" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
             @strongify(self)
             [self handle_closeEvent:nil];
         }];
@@ -109,7 +109,7 @@
             //保存 token
             [DataUtil setLoginToken:token];
             @weakify(self)
-            [self.view makeToast:@"Login Suecess" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
+            [self.view makeToast:@"Login Success" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
                 @strongify(self)
                 [self handle_closeEvent:nil];
             }];
@@ -216,7 +216,7 @@
         [ASUserInfoManager.shared getInfo];
         
         K_WEAK_SELF;
-        [self.view makeToast:@"Login Suecess" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
+        [self.view makeToast:@"Login Success" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
             K_STRONG_SELF;
             [self handle_closeEvent:nil];
         }];
@@ -256,7 +256,7 @@
 -(EamilTFmatchV *)xxx_emailTFV{
     if (!_xxx_emailTFV) {
         _xxx_emailTFV = [[EamilTFmatchV alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
-//        _xxx_emailTFV.xxx_emailTF.text = @"845600348@qq.com";
+        _xxx_emailTFV.xxx_emailTF.text = @"845600348@qq.com";
     }
     return _xxx_emailTFV;
 }
@@ -265,7 +265,7 @@
 - (PassWordSecureBtnV *)xxx_passwordV {
     if (!_xxx_passwordV) {
         _xxx_passwordV = [[PassWordSecureBtnV alloc]initWithFrame:CGRectMake(20, CGRectGetMaxY(self.xxx_emailTFV.frame)+30, KScreenWidth-40, 50+20)];
-//        _xxx_passwordV.xxx_passwordTF.text = @"nuli322103";
+        _xxx_passwordV.xxx_passwordTF.text = @"nuli322103";
     }
     return _xxx_passwordV;
 }

+ 9 - 0
Asteria/Fuction/UserCenter/UserCenterHome/ASUserCenterViewController.m

@@ -46,17 +46,26 @@
     [self configSubVs];
     [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(setData) name:UserInfoUpdate object:nil];
     
+    //切换币种之后通知首页数据刷新
+    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(getRecommendGoodsData) name:HomeDataUpdateByCurrency object:nil];
+    
 }
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     [self setData];
+    [self getSignInfoData];
     [self getOrders];
 }
 
 // MARK: - setData
 - (void)setData {
     [self.tableHeadV.topV setData];
+    
+//    [self.tableHeadV.signV refreshData];
+}
+
+- (void)getSignInfoData {
     [self.tableHeadV.signV refreshData];
 }
 

+ 1 - 0
Asteria/Fuction/UserCenter/UserCenterHome/views/ASSginView.m

@@ -45,6 +45,7 @@
     }];
     
     [self requestUserIsSignData];
+    
 }
 
 - (void)requestUserIsSignData {

+ 5 - 3
Asteria/Fuction/UserCenter/UserCenterHome/views/KWMineMoreProductsCell.m

@@ -30,6 +30,8 @@
 }
 
 - (void)setTypeArray:(NSArray *)typeArray {
+    
+    self.currentKey = nil;
     _typeArray = typeArray;
     
     for (int i = 0; i < _typeArray.count; i++) {
@@ -70,11 +72,11 @@
 
 -(void)calulateItemWidth {
     NSMutableArray<NSNumber *> *tempArr = [NSMutableArray array];
-    NSDictionary *attribute = @{NSFontAttributeName: self.titleLb.font};
+    NSDictionary *attribute = @{NSFontAttributeName: [UIFont fontWithName:Rob_Regular size:12]};
     for (HomeFilterModel *typeM in self.typeArray) {
         NSString *key = typeM.title;
-        CGFloat wid = [key boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 34) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size.width + 10;
-//        CGFloat wid = [key widthForFont:[UIFont fontWithName:Rob_Regular size:12]]  + 10;
+        CGFloat wid = [key boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 34) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute context:nil].size.width + 20;
+//        CGFloat wid1 = [key widthForFont:[UIFont fontWithName:Rob_Regular size:12]]  + 20;
         [tempArr addObject:[NSNumber numberWithFloat:wid]];
     }
     int numLins = tempArr.count > 0 ? 1 : 0;

+ 1 - 0
Asteria/NetTools/ASNetApis.h

@@ -21,6 +21,7 @@
 // MARK: - host
 #if (DEBUG)
 #define HostPath @"iostest.bilisar.com"  //测试
+//#define HostPath @"www.bilisar.com"  //测试
 #define MsgHostPath @"message.bilisar.com"
 //#define HostPath @"pc.bilisar.com"  //正式
 #else

+ 3 - 3
Asteria/NetTools/ASNetTools.m

@@ -530,7 +530,7 @@
         dispatch_async(dispatch_get_main_queue(), ^{
             NSString *json = [op responseJSON];
             id temp = [json mj_JSONObject];
-            NSLog(@"---Get-----url:\n%@\n-----data:\n%@\n--",path, temp);
+            NSLog(@"---Get-----url:\n%@\n-----data:\n%@\n--",path, json);
             if ([temp isKindOfClass:[NSDictionary class]]) {
                 NSDictionary *result = (NSDictionary *)temp;
                 NSString *status = [NSString stringWithFormat:@"%@", result[@"status"]];
@@ -542,8 +542,8 @@
                     faild(status, msg);
                 }
             } else {
-                NSString *msg = @"failed";
-                faild(0, msg);
+//                NSString *msg = @"failed";
+                faild(0, nil);
             }
             
         });