ソースを参照

商品详情、结算支付

“wangdongchao” 1 年間 前
コミット
0d3acae5b4

+ 6 - 0
Asteria.xcodeproj/project.pbxproj

@@ -227,6 +227,7 @@
 		8810F59C2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F59B2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m */; };
 		8810F59F2BFC7D7600346FD4 /* ASGoodsReviewHeadCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F59E2BFC7D7600346FD4 /* ASGoodsReviewHeadCell.m */; };
 		8810F5A22BFF448C00346FD4 /* ASMyCartNoDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A12BFF448C00346FD4 /* ASMyCartNoDataView.m */; };
+		8810F5A82C01849C00346FD4 /* ASGoodsReviewFootCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */; };
 		8C24ECE114420CDEE7B9B22B /* Pods_Asteria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54DCE8001991D89B696E7D44 /* Pods_Asteria.framework */; };
 		9A1247942A1B082300126226 /* Fuction_Tool.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A1247932A1B082300126226 /* Fuction_Tool.m */; };
 		9A1247972A1B0A2800126226 /* AS_ForgotC.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A1247962A1B0A2800126226 /* AS_ForgotC.m */; };
@@ -802,6 +803,8 @@
 		8810F59E2BFC7D7600346FD4 /* ASGoodsReviewHeadCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsReviewHeadCell.m; sourceTree = "<group>"; };
 		8810F5A02BFF448C00346FD4 /* ASMyCartNoDataView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASMyCartNoDataView.h; sourceTree = "<group>"; };
 		8810F5A12BFF448C00346FD4 /* ASMyCartNoDataView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASMyCartNoDataView.m; sourceTree = "<group>"; };
+		8810F5A62C01849C00346FD4 /* ASGoodsReviewFootCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsReviewFootCell.h; sourceTree = "<group>"; };
+		8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsReviewFootCell.m; sourceTree = "<group>"; };
 		9A1247922A1B082300126226 /* Fuction_Tool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fuction_Tool.h; sourceTree = "<group>"; };
 		9A1247932A1B082300126226 /* Fuction_Tool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Fuction_Tool.m; sourceTree = "<group>"; };
 		9A1247952A1B0A2800126226 /* AS_ForgotC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AS_ForgotC.h; sourceTree = "<group>"; };
@@ -2514,6 +2517,8 @@
 				8810F5982BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m */,
 				8810F59D2BFC7D7600346FD4 /* ASGoodsReviewHeadCell.h */,
 				8810F59E2BFC7D7600346FD4 /* ASGoodsReviewHeadCell.m */,
+				8810F5A62C01849C00346FD4 /* ASGoodsReviewFootCell.h */,
+				8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */,
 			);
 			path = V;
 			sourceTree = "<group>";
@@ -2896,6 +2901,7 @@
 				81601FE62A2DB19300E4A8F1 /* ASHomeViewController.m in Sources */,
 				9A2415BC2B6784A500A6E903 /* MyCartItemCell.m in Sources */,
 				81354BF22A287B120082C93A /* KWMineHomeOrderModel.m in Sources */,
+				8810F5A82C01849C00346FD4 /* ASGoodsReviewFootCell.m in Sources */,
 				9A2415B92B677DDF00A6E903 /* Target_Cart.m in Sources */,
 				8810F5672BF5EBF400346FD4 /* ASOrderListViewController.m in Sources */,
 				81E73EBD2B1AABF300C10938 /* ASGiftCardListViewModel.m in Sources */,

+ 4 - 3
Asteria/Fuction/Cart/Cell/MyCartGrandTotalCell.m

@@ -86,12 +86,12 @@
             [self.subBottomV xxx_configTips:dic[@"title"] price:priceStr];
         }else{ //stackSubTopV
             NSString *priceStr = @"0";
-            if([code isEqualToString:@"discount"]){
+            if([code isEqualToString:@"discount"] || [code isEqualToString:@"mageworx_rewardpoints_spend"]){
                 if([dic[@"value"] floatValue] <0.00){
-                    CGFloat temF =fabsf([dic[@"value"] floatValue]);
+                    float temF =fabsf([dic[@"value"] floatValue]);
                     priceStr =   [NSString stringWithFormat:@"-%@%.2f",model.currency_symbol,temF];
                 }
-            }else{
+            } else{
                 priceStr = [NSString stringWithFormat:@"%@%@",model.currency_symbol,dic[@"value"]];
             }
             SubtotalCellItemV *itemV = [[SubtotalCellItemV alloc] init];
@@ -180,6 +180,7 @@
         make.left.mas_equalTo(0);
         make.top.mas_equalTo(0);
         make.height.mas_equalTo(30);
+        make.right.mas_equalTo(-100);
     }];
     [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.tipsLab.mas_right).offset(10);

+ 14 - 0
Asteria/Fuction/Cart/Checkout/ASCheckoutPointApplyCell.m

@@ -14,6 +14,7 @@
 @interface ASCheckoutPointApplyCell ()
 @property (nonatomic, strong) UIView *bgView;
 @property (nonatomic, strong) UILabel *titleLab;
+@property (nonatomic, strong) UILabel *priceLab;
 @property (nonatomic, strong) TT_CustonTF  *codeTF;
 @property (nonatomic, strong) UIButton *applyBtn;
 @property (nonatomic, strong) QMUILabel *pointDesLab;
@@ -54,6 +55,7 @@
         make.right.mas_equalTo(-10);
         make.bottom.mas_equalTo(0);
     }];
+    
     [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(10);
         make.top.mas_equalTo(20);
@@ -61,6 +63,16 @@
         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) {
+        make.left.equalTo(self.titleLab.mas_right).offset(20);
+        make.right.mas_equalTo(-10);
+        make.centerY.mas_equalTo(self.titleLab);
+    }];
+    
     [applyTmpV mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.titleLab.mas_bottom).offset(20);
         make.left.mas_equalTo(10);
@@ -115,6 +127,8 @@
         self.applyBtn.selected = NO;
     }
     
+    _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];
     

+ 2 - 1
Asteria/Fuction/Cart/Checkout/CartCheckTableV.m

@@ -13,6 +13,7 @@
     NSObject *objectM = self.infodata[indexPath.row];
     if([objectM isKindOfClass:[CartTotalsItemsM class]]){
         ASCheckoutGoodsItemCell *cell = [ASCheckoutGoodsItemCell cellWithTableView:tableView CellClass:[ASCheckoutGoodsItemCell class]];
+        cell.clipsToBounds = YES;
         
         [cell configData:(CartTotalsItemsM *)objectM];
         @weakify(self)
@@ -95,7 +96,7 @@
     
     NSObject *objectM = self.infodata[indexPath.row];
     if([objectM isKindOfClass:[CartTotalsItemsM class]] && self.isFlod){
-        return 0;
+        return 0.0001;
     }
     
     return UITableViewAutomaticDimension;

+ 16 - 2
Asteria/Fuction/Goods/V/ASGoodsDetailsTableView.m

@@ -16,6 +16,7 @@
 #import "ASGoodsGuaranteeInfoCell.h"
 #import "ASGoodsReviewHeadCell.h"
 #import "GoodsReviewsCell.h"
+#import "ASGoodsReviewFootCell.h"
 
 @interface ASGoodsDetailsTableView()
 
@@ -98,7 +99,7 @@
         return  cell;
     } else if ([typeStr isEqualToString:@"reviewHead"]) {
         ASGoodsReviewHeadCell *cell = [ASGoodsReviewHeadCell cellWithTableView:tableView CellClass:[ASGoodsReviewHeadCell class]];
-        
+        cell.clipsToBounds = YES;
         [cell configData:(GoodsInformationM *)objectM];
         
         @weakify(self)
@@ -111,6 +112,7 @@
     } else if ([objectM isKindOfClass:[GoodsReviewsListM class]]) {
 //        GoodsReviewsListM *objectM =  self.infodata[indexPath.row];
         GoodsReviewsCell *cell = [GoodsReviewsCell cellWithTableView:tableView CellClass:[GoodsReviewsCell class]];
+        cell.clipsToBounds = YES;
         [cell configData:objectM];
         @weakify(self)
         cell.currencyparameterClose = ^(NSInteger type, id Data) {
@@ -118,8 +120,20 @@
             
         };
         return cell;
+    } else if ([typeStr isEqualToString:@"reviewFoot"]) {
+        //        GoodsReviewsListM *objectM =  self.infodata[indexPath.row];
+        ASGoodsReviewFootCell *cell = [ASGoodsReviewFootCell cellWithTableView:tableView CellClass:[ASGoodsReviewFootCell class]];
+        cell.clipsToBounds = YES;
+        @weakify(self)
+        cell.currencyparameterClose = ^(NSInteger type, id Data) {
+            @strongify(self)
+            [self generaltriggermethodType:type data:Data];
+        };
+        return cell;
     }
     
+    
+    
     return  nil;
     
 }
@@ -137,7 +151,7 @@
         objectM = dataM;
     }
     
-    if (([typeStr isEqualToString:@"reviewHead"] || [objectM isKindOfClass:[GoodsReviewsListM class]]) && !self.isReview) {
+    if (([typeStr isEqualToString:@"reviewHead"] || [objectM isKindOfClass:[GoodsReviewsListM class]] || [typeStr isEqualToString:@"reviewFoot"]) && !self.isReview) {
         return 0;
     }
     

+ 16 - 0
Asteria/Fuction/Goods/V/ASGoodsReviewFootCell.h

@@ -0,0 +1,16 @@
+//
+//  ASGoodsReviewFootCell.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/25.
+//
+
+#import <WMBase/WMBase.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsReviewFootCell : TT_BaseCell
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 52 - 0
Asteria/Fuction/Goods/V/ASGoodsReviewFootCell.m

@@ -0,0 +1,52 @@
+//
+//  ASGoodsReviewFootCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/25.
+//
+
+#import "ASGoodsReviewFootCell.h"
+
+@interface ASGoodsReviewFootCell()
+
+
+@end
+
+@implementation ASGoodsReviewFootCell
+
+- (void)setupSubviewS {
+//    UIView *backView = [[UIView alloc] init];
+//    [self.contentView addSubview:backView];
+//    [backView mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(10);
+//        make.top.mas_equalTo(10);
+//        make.right.mas_equalTo(-10);
+////            make.height.mas_equalTo(45);
+//        make.bottom.mas_equalTo(0);
+//    }];
+    
+    UIButton *viewMoreBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    viewMoreBtn.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
+    [viewMoreBtn setTitle:@"VIEW MORE" forState:UIControlStateNormal];
+    [viewMoreBtn setTitleColor:Col_000 forState:UIControlStateNormal];
+    viewMoreBtn.backgroundColor = Col_FFF;
+    [viewMoreBtn addTarget:self action:@selector(_btnClick) forControlEvents:UIControlEventTouchUpInside];
+    TT_ViewBorderRadius(viewMoreBtn, 4, 1, Col_000);
+    [self.contentView addSubview:viewMoreBtn];
+    [viewMoreBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(10);
+        make.height.mas_equalTo(36);
+        make.width.mas_equalTo(200);
+        make.centerX.mas_equalTo(self.contentView);
+        make.bottom.mas_equalTo(-10);
+    }];
+    
+}
+
+- (void)_btnClick {
+    if (self.currencyparameterClose) {
+        self.currencyparameterClose(5, nil);
+    }
+}
+
+@end

+ 6 - 1
Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.m

@@ -77,7 +77,7 @@
     K_WEAK_SELF;
     self.TableV.tapClose = ^(NSInteger num, id data) {
         K_STRONG_SELF;
-        if (num == 1) {//查看评论
+        if (num == 1 || num == 5) {//查看评论
             [self action_GoodsReviewsListC];
         } else if (num == 2) {//商品web详情
             self.isReview = NO;
@@ -195,6 +195,11 @@
     //评论数据
     [self.TableV.infodata addObjectsFromArray:self.reviewDataArray];
     
+    //评论底部
+    NSDictionary *reviewFoot = @{@"type":@"reviewFoot", @"data":self.model};
+    [self.TableV.infodata addObject:reviewFoot];
+    
+    
 //    if (self.isReview) {
 //        
 //