ソースを参照

feat:商品详情控制器重写

“wangdongchao” 1 年間 前
コミット
25cf993269
29 ファイル変更1731 行追加18 行削除
  1. 54 0
      Asteria.xcodeproj/project.pbxproj
  2. 2 3
      Asteria/Fuction/Cart/Cart_CheckoutC.m
  3. 8 2
      Asteria/Fuction/Cart/Cart_MyCartC.m
  4. 3 1
      Asteria/Fuction/Cart/Checkout/ASCheckoutShipMethodCell.m
  5. 1 1
      Asteria/Fuction/Cart/Checkout/ASCheckoutTopView.m
  6. 8 0
      Asteria/Fuction/Goods/M/GoodsInformationM.h
  7. 2 2
      Asteria/Fuction/Goods/Revies/GoodsReviewsWriteC.m
  8. 1 1
      Asteria/Fuction/Goods/Target/Target_Goods.h
  9. 3 3
      Asteria/Fuction/Goods/Target/Target_Goods.m
  10. 19 0
      Asteria/Fuction/Goods/V/ASGoodsBannerCell.h
  11. 48 0
      Asteria/Fuction/Goods/V/ASGoodsBannerCell.m
  12. 16 0
      Asteria/Fuction/Goods/V/ASGoodsCouponCell.h
  13. 14 0
      Asteria/Fuction/Goods/V/ASGoodsCouponCell.m
  14. 21 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsSizeCell.h
  15. 114 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsSizeCell.m
  16. 47 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsSizeSelView.h
  17. 541 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsSizeSelView.m
  18. 16 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsTableView.h
  19. 85 0
      Asteria/Fuction/Goods/V/ASGoodsDetailsTableView.m
  20. 19 0
      Asteria/Fuction/Goods/V/ASGoodsGuaranteeInfoCell.h
  21. 142 0
      Asteria/Fuction/Goods/V/ASGoodsGuaranteeInfoCell.m
  22. 23 0
      Asteria/Fuction/Goods/V/ASGoodsIntrouduceWebView.h
  23. 146 0
      Asteria/Fuction/Goods/V/ASGoodsIntrouduceWebView.m
  24. 19 0
      Asteria/Fuction/Goods/V/ASGoodsTitlePriceCell.h
  25. 166 0
      Asteria/Fuction/Goods/V/ASGoodsTitlePriceCell.m
  26. 4 4
      Asteria/Fuction/Goods/V/GoodsDetailsBottomV.m
  27. 18 0
      Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.h
  28. 190 0
      Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.m
  29. 1 1
      Asteria/Product/CTMediatoaTargets/CTMediator+ASTargerts.m

+ 54 - 0
Asteria.xcodeproj/project.pbxproj

@@ -212,6 +212,15 @@
 		8810F5672BF5EBF400346FD4 /* ASOrderListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F55C2BF5EBF400346FD4 /* ASOrderListViewController.m */; };
 		8810F56A2BF5F86D00346FD4 /* ASPayFailedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5692BF5F86D00346FD4 /* ASPayFailedViewController.m */; };
 		8810F56D2BF5F8D800346FD4 /* ASPayFinishHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F56C2BF5F8D800346FD4 /* ASPayFinishHeadView.m */; };
+		8810F57E2BF74A2B00346FD4 /* ASGoodsDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F57D2BF74A2B00346FD4 /* ASGoodsDetailsViewController.m */; };
+		8810F5812BF74A5800346FD4 /* ASGoodsDetailsTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5802BF74A5800346FD4 /* ASGoodsDetailsTableView.m */; };
+		8810F5842BF74E6400346FD4 /* ASGoodsBannerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5832BF74E6400346FD4 /* ASGoodsBannerCell.m */; };
+		8810F58A2BF839C600346FD4 /* ASGoodsDetailsSizeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5892BF839C600346FD4 /* ASGoodsDetailsSizeCell.m */; };
+		8810F5902BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F58E2BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.m */; };
+		8810F5932BFB250D00346FD4 /* ASGoodsTitlePriceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5922BFB250D00346FD4 /* ASGoodsTitlePriceCell.m */; };
+		8810F5962BFB291300346FD4 /* ASGoodsCouponCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5952BFB291300346FD4 /* ASGoodsCouponCell.m */; };
+		8810F5992BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5982BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m */; };
+		8810F59C2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F59B2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.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 */; };
@@ -757,6 +766,24 @@
 		8810F5692BF5F86D00346FD4 /* ASPayFailedViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPayFailedViewController.m; sourceTree = "<group>"; };
 		8810F56B2BF5F8D800346FD4 /* ASPayFinishHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPayFinishHeadView.h; sourceTree = "<group>"; };
 		8810F56C2BF5F8D800346FD4 /* ASPayFinishHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPayFinishHeadView.m; sourceTree = "<group>"; };
+		8810F57C2BF74A2B00346FD4 /* ASGoodsDetailsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsDetailsViewController.h; sourceTree = "<group>"; };
+		8810F57D2BF74A2B00346FD4 /* ASGoodsDetailsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsDetailsViewController.m; sourceTree = "<group>"; };
+		8810F57F2BF74A5800346FD4 /* ASGoodsDetailsTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsDetailsTableView.h; sourceTree = "<group>"; };
+		8810F5802BF74A5800346FD4 /* ASGoodsDetailsTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsDetailsTableView.m; sourceTree = "<group>"; };
+		8810F5822BF74E6400346FD4 /* ASGoodsBannerCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsBannerCell.h; sourceTree = "<group>"; };
+		8810F5832BF74E6400346FD4 /* ASGoodsBannerCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsBannerCell.m; sourceTree = "<group>"; };
+		8810F5882BF839C600346FD4 /* ASGoodsDetailsSizeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsDetailsSizeCell.h; sourceTree = "<group>"; };
+		8810F5892BF839C600346FD4 /* ASGoodsDetailsSizeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsDetailsSizeCell.m; sourceTree = "<group>"; };
+		8810F58E2BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASGoodsDetailsSizeSelView.m; sourceTree = "<group>"; };
+		8810F58F2BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASGoodsDetailsSizeSelView.h; sourceTree = "<group>"; };
+		8810F5912BFB250D00346FD4 /* ASGoodsTitlePriceCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsTitlePriceCell.h; sourceTree = "<group>"; };
+		8810F5922BFB250D00346FD4 /* ASGoodsTitlePriceCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsTitlePriceCell.m; sourceTree = "<group>"; };
+		8810F5942BFB291300346FD4 /* ASGoodsCouponCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsCouponCell.h; sourceTree = "<group>"; };
+		8810F5952BFB291300346FD4 /* ASGoodsCouponCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsCouponCell.m; sourceTree = "<group>"; };
+		8810F5972BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsGuaranteeInfoCell.h; sourceTree = "<group>"; };
+		8810F5982BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsGuaranteeInfoCell.m; sourceTree = "<group>"; };
+		8810F59A2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASGoodsIntrouduceWebView.h; sourceTree = "<group>"; };
+		8810F59B2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsIntrouduceWebView.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>"; };
@@ -2427,6 +2454,8 @@
 				9AD364C52A05E73E00452C7A /* AS_GoodsDetailsC.m */,
 				9A5F52882B5F56FD007D3791 /* AS_GoodsSizeC.h */,
 				9A5F52892B5F56FD007D3791 /* AS_GoodsSizeC.m */,
+				8810F57C2BF74A2B00346FD4 /* ASGoodsDetailsViewController.h */,
+				8810F57D2BF74A2B00346FD4 /* ASGoodsDetailsViewController.m */,
 			);
 			path = VC;
 			sourceTree = "<group>";
@@ -2441,6 +2470,22 @@
 				9AD3459F2A08D55D005CA070 /* Banner */,
 				9A3F5CB92B3C192000DDB6A7 /* GoodsDetailsBottomV.h */,
 				9A3F5CBA2B3C192000DDB6A7 /* GoodsDetailsBottomV.m */,
+				8810F57F2BF74A5800346FD4 /* ASGoodsDetailsTableView.h */,
+				8810F5802BF74A5800346FD4 /* ASGoodsDetailsTableView.m */,
+				8810F5822BF74E6400346FD4 /* ASGoodsBannerCell.h */,
+				8810F5832BF74E6400346FD4 /* ASGoodsBannerCell.m */,
+				8810F5912BFB250D00346FD4 /* ASGoodsTitlePriceCell.h */,
+				8810F5922BFB250D00346FD4 /* ASGoodsTitlePriceCell.m */,
+				8810F5942BFB291300346FD4 /* ASGoodsCouponCell.h */,
+				8810F5952BFB291300346FD4 /* ASGoodsCouponCell.m */,
+				8810F59A2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.h */,
+				8810F59B2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m */,
+				8810F5882BF839C600346FD4 /* ASGoodsDetailsSizeCell.h */,
+				8810F5892BF839C600346FD4 /* ASGoodsDetailsSizeCell.m */,
+				8810F58F2BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.h */,
+				8810F58E2BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.m */,
+				8810F5972BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.h */,
+				8810F5982BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m */,
 			);
 			path = V;
 			sourceTree = "<group>";
@@ -2839,6 +2884,7 @@
 				81E257EE2A120756004EEF71 /* ASUserCenterTopView.m in Sources */,
 				81C326622A36B33B002EF442 /* ASHomeActiveView.m in Sources */,
 				81DFA56A2A46D82200DA708B /* ASPointDetailTableView.m in Sources */,
+				8810F57E2BF74A2B00346FD4 /* ASGoodsDetailsViewController.m in Sources */,
 				9AD346042A08D60F005CA070 /* ZFKVOController.m in Sources */,
 				81717CA12A3C0A3500648139 /* KWProductMenuFilterItemHeaderView.m in Sources */,
 				81C326662A36B794002EF442 /* VerScrollTextView.m in Sources */,
@@ -2847,6 +2893,7 @@
 				81717D372A3D322700648139 /* KWHisCollectHeaderView.m in Sources */,
 				8810F5212BEDABFA00346FD4 /* ASCheckoutCommentCell.m in Sources */,
 				9AD346132A08D60F005CA070 /* ZFLoadingView.m in Sources */,
+				8810F5902BF83D0400346FD4 /* ASGoodsDetailsSizeSelView.m in Sources */,
 				9ACBEC212A14585300A8F97A /* CTMediator+ASTargerts.m in Sources */,
 				8134C1AD2A13094F006EB0EC /* Target_userCenter.m in Sources */,
 				81E257F32A120975004EEF71 /* ASUserBaseInfoView.m in Sources */,
@@ -2919,8 +2966,10 @@
 				8810F56A2BF5F86D00346FD4 /* ASPayFailedViewController.m in Sources */,
 				8810F52C2BF1A1CD00346FD4 /* ASAddGiftGoodsView.m in Sources */,
 				9A31EDFD2B468A55009F11EE /* RadioButton.m in Sources */,
+				8810F59C2BFB3A4500346FD4 /* ASGoodsIntrouduceWebView.m in Sources */,
 				9AD345A72A08D571005CA070 /* TYPageControl.m in Sources */,
 				81354C0A2A289C350082C93A /* KWScrollOffsetView.m in Sources */,
+				8810F5962BFB291300346FD4 /* ASGoodsCouponCell.m in Sources */,
 				81354C032A289A070082C93A /* HomeFilterModel.m in Sources */,
 				9A5F528A2B5F56FD007D3791 /* AS_GoodsSizeC.m in Sources */,
 				8131A2932B3950DA00A191BE /* ASExtraPointsModel.m in Sources */,
@@ -2951,12 +3000,14 @@
 				81E5EE942A4A760D0075695F /* ASVipCenterLineItemView.m in Sources */,
 				9A3F5CBB2B3C192000DDB6A7 /* GoodsDetailsBottomV.m in Sources */,
 				81601FFF2A2DC8E700E4A8F1 /* ASHomeBannerCell.m in Sources */,
+				8810F5992BFB2B2400346FD4 /* ASGoodsGuaranteeInfoCell.m in Sources */,
 				812021212B16CD630026B8B5 /* ASSginViewModel.m in Sources */,
 				9AF9085F2B3976F3008AC2D2 /* RYBaseVM.m in Sources */,
 				81CE28972AF4953C0012AA45 /* ASGiftCardModel.m in Sources */,
 				9AD6A5442A1218E8001DE3D9 /* PassWordSecureBtnV.m in Sources */,
 				811F42462A40533C00DA68F1 /* ASPointsHomeViewController.m in Sources */,
 				8131A2802B3687EE00A191BE /* ASCustomWindow.m in Sources */,
+				8810F58A2BF839C600346FD4 /* ASGoodsDetailsSizeCell.m in Sources */,
 				816D0C9A2AF3901C00395B5B /* ASGiftCardListViewController.m in Sources */,
 				81C796372A5517B0003083B8 /* ASSettingListCell.m in Sources */,
 				81717D392A3D322700648139 /* KWCustomLayout.m in Sources */,
@@ -3001,11 +3052,13 @@
 				81354BF52A287BED0082C93A /* KWMineHomeOrderSubView.m in Sources */,
 				9AD345A82A08D571005CA070 /* TYCyclePagerView.m in Sources */,
 				8810F55F2BF5EBF400346FD4 /* ASOrderDetailsItemsCell.m in Sources */,
+				8810F5812BF74A5800346FD4 /* ASGoodsDetailsTableView.m in Sources */,
 				9AD346202A08E30E005CA070 /* SelectVCollectionViewCell.m in Sources */,
 				81601FFB2A2DC78300E4A8F1 /* WMZBannerOverLayout.m in Sources */,
 				81354C002A2899CB0082C93A /* KWMineMoreProductModel.m in Sources */,
 				81717D362A3D322700648139 /* KWLenovoWordListView.m in Sources */,
 				8134C1BA2A1372A7006EB0EC /* ASUserCenterEnterItemV.m in Sources */,
+				8810F5932BFB250D00346FD4 /* ASGoodsTitlePriceCell.m in Sources */,
 				8127ADDB2B1193A300464D27 /* ASNetTools.m in Sources */,
 				812021152B14659A0026B8B5 /* ASUserInfoManager.m in Sources */,
 				9AD3460A2A08D60F005CA070 /* ZFUtilities.m in Sources */,
@@ -3015,6 +3068,7 @@
 				9A337E3A2A04EE1A00D058A5 /* Target_B.m in Sources */,
 				8186564D2A5BF6010049D861 /* ASCategoryViewController.m in Sources */,
 				9AD6A5452A1218E8001DE3D9 /* EamilTFmatchV.m in Sources */,
+				8810F5842BF74E6400346FD4 /* ASGoodsBannerCell.m in Sources */,
 				9AD345FF2A08D60F005CA070 /* ZFPlayerNotification.m in Sources */,
 				81717D282A3C55CC00648139 /* CTMediator+Categorys.m in Sources */,
 				9AD346092A08D60F005CA070 /* ZFAVPlayerManager.m in Sources */,

+ 2 - 3
Asteria/Fuction/Cart/Cart_CheckoutC.m

@@ -221,8 +221,6 @@
                 firstModel.isSelect = YES;
                 self.shipmethodCellM.shipMethodModel = firstModel;
                 
-                self.shipmethodCellM.shipmethodSymbol = self.totalsM.currency_symbol;
-                
                 if (self.addressCellM.addressModel) {
                     //默认设置第一个运输方式
                     [self requestSetShipMethodByAddress];
@@ -274,7 +272,7 @@
 
 - (void)updateData{
     
-    [self.topView setTopViewData:self.totalsM.items_qty price:[NSString stringWithFormat:@"%@%@",self.totalsM.currency_symbol,self.totalsM.subtotal]];
+    [self.topView setTopViewData:AS_String_NotNull(self.totalsM.items_qty) price:[NSString stringWithFormat:@"%@%@",AS_String_NotNull(self.totalsM.currency_symbol),AS_String_NotNull(self.totalsM.subtotal)]];
     
     [self.TableV.infodata removeAllObjects];
     self.TableV.infodata = [NSMutableArray arrayWithArray:self.totalsM.items];
@@ -283,6 +281,7 @@
     [self.TableV.infodata addObject:self.addressCellM];
     
     //运输方式
+    self.shipmethodCellM.shipmethodSymbol = self.totalsM.currency_symbol;
     [self.TableV.infodata addObject:self.shipmethodCellM];
     
     //优惠券

+ 8 - 2
Asteria/Fuction/Cart/Cart_MyCartC.m

@@ -14,6 +14,8 @@
 
 #import "ASAddGiftGoodsView.h"
 
+#import "ASGoodsDetailsViewController.h"
+
 @interface Cart_MyCartC ()<RY_baseVMprotocol>
 @property (nonatomic, strong) CartVM *VM;
 @property (nonatomic, strong) UIView *topBgV;
@@ -264,8 +266,12 @@
         if(itemM.isGift){
             return;
         }
-        UIViewController *viewController = [[CTMediator sharedInstance] Goods_GoodsDetailsC:@{@"entity_id":itemM.product_id}];
-        [self.navigationController pushViewController:viewController animated:YES];
+//        UIViewController *viewController = [[CTMediator sharedInstance] Goods_GoodsDetailsC:@{@"entity_id":itemM.product_id}];
+//        [self.navigationController pushViewController:viewController animated:YES];
+        
+        ASGoodsDetailsViewController *goodsVC = [[ASGoodsDetailsViewController alloc] init];
+        goodsVC.entity_id = itemM.product_id;
+        [self.navigationController pushViewController:goodsVC animated:YES];
     }
 }
 

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

@@ -58,13 +58,15 @@
     
     float floatY = 0;
     
+    [self.shipMethodView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
+    
     for (int i = 0; i < model.shipMethodArray.count; i++) {
         ASCheckoutShipMethodModel *shipModel = model.shipMethodArray[i];
         
         ASShipMethodItem *shipItem = [[ASShipMethodItem alloc] initWithFrame:CGRectMake(0, floatY, KScreenWidth - 20, 53)];
         [_shipMethodView addSubview:shipItem];
         
-        [shipItem setShipItemData:shipModel symbol:model.shipmethodSymbol];
+        [shipItem setShipItemData:shipModel symbol:AS_String_NotNull(model.shipmethodSymbol)];
         shipItem.selectBtn.tag = i;
         [shipItem.selectBtn addTarget:self action:@selector(_selectShipMethod:) forControlEvents:UIControlEventTouchUpInside];
         

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

@@ -49,7 +49,7 @@
     return self;
 }
 - (void)setTopViewData:(NSString *)itemCount price:(NSString *)priceStr {
-    _countLab.text = [NSString stringWithFormat:@"show order items (%@)", itemCount];
+    _countLab.text = [NSString stringWithFormat:@"show order items (%@)", AS_String_valid(itemCount) ? AS_String_NotNull(itemCount) : @"0"];
     
     _priceLab.text = priceStr;
 }

+ 8 - 0
Asteria/Fuction/Goods/M/GoodsInformationM.h

@@ -51,13 +51,21 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong) NSArray <OptionsValuesM *>*values;
 @property (nonatomic, assign) NSInteger optionSelectTag;
 
+@property (nonatomic, copy) NSString *is_require;
+
+@property (nonatomic, assign) BOOL isLongValue;
 
 @end
 
 @interface OptionsValuesM : NSObject
+
 @property (nonatomic, copy) NSString *title;
 @property (nonatomic, copy) NSString *option_type_id;
 @property (nonatomic, assign) double price;
 
+//@property (nonatomic, copy) NSString *price;
+@property (nonatomic, copy) NSString *price_type;
+@property (nonatomic, copy) NSString *sku;
+
 @end
 NS_ASSUME_NONNULL_END

+ 2 - 2
Asteria/Fuction/Goods/Revies/GoodsReviewsWriteC.m

@@ -6,7 +6,7 @@
 //
 
 #import "GoodsReviewsWriteC.h"
-#import "AS_GoodsDetailsC.h"
+#import "ASGoodsDetailsViewController.h"
 #import "HCSStarRatingView.h"
 #import "GoodWritUpImgV.h"
 #import <QMUIKit/QMUIImagePickerPreviewViewController.h>
@@ -289,7 +289,7 @@ RY_baseVMprotocol>
                 @strongify(self)
                 NSArray *tmpVcAry = self.navigationController.viewControllers;
                 for(UIViewController *vc in tmpVcAry){
-                    if([vc isKindOfClass:[AS_GoodsDetailsC class]]){
+                    if([vc isKindOfClass:[ASGoodsDetailsViewController class]]){
                         [self.navigationController popToViewController:vc animated:YES];
                         return;
                     }

+ 1 - 1
Asteria/Fuction/Goods/Target/Target_Goods.h

@@ -10,7 +10,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface Target_Goods : NSObject
-- (UIViewController *)Action_AS_GoodsDetailsC:(NSDictionary *)params;
+- (UIViewController *)Action_ASGoodsDetailsViewController:(NSDictionary *)params;
 - (UIViewController *)Action_AS_GoodsSizeC:(NSDictionary *)params;
 
 - (UIViewController *)Action_WriteReview:(NSDictionary *)params;

+ 3 - 3
Asteria/Fuction/Goods/Target/Target_Goods.m

@@ -6,13 +6,13 @@
 //
 
 #import "Target_Goods.h"
-#import "AS_GoodsDetailsC.h"
+#import "ASGoodsDetailsViewController.h"
 #import "AS_GoodsSizeC.h"
 #import "GoodsReviewsWriteC.h"
 
 @implementation Target_Goods
-- (UIViewController *)Action_AS_GoodsDetailsC:(NSDictionary *)params{
-    AS_GoodsDetailsC *vc = [[AS_GoodsDetailsC alloc]init];
+- (UIViewController *)Action_ASGoodsDetailsViewController:(NSDictionary *)params{
+    ASGoodsDetailsViewController *vc = [[ASGoodsDetailsViewController alloc]init];
     vc.entity_id = params[@"entity_id"];
     return vc;
 }

+ 19 - 0
Asteria/Fuction/Goods/V/ASGoodsBannerCell.h

@@ -0,0 +1,19 @@
+//
+//  ASGoodsBannerCell.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/17.
+//
+
+#import <WMBase/WMBase.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsBannerCell : TT_BaseCell
+
+@property (nonatomic, strong) GoodsInformationM *infoModel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 48 - 0
Asteria/Fuction/Goods/V/ASGoodsBannerCell.m

@@ -0,0 +1,48 @@
+//
+//  ASGoodsBannerCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/17.
+//
+
+#import "ASGoodsBannerCell.h"
+#import "WKM_goodsBanner.h"
+
+@interface ASGoodsBannerCell()
+
+@property (nonatomic, strong) WKM_goodsBanner *goodsBanner;
+
+@end
+
+@implementation ASGoodsBannerCell
+
+- (void)setupSubviewS{
+    
+    self.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+    
+    
+    [self.contentView addSubview:self.goodsBanner];
+    
+    [self.goodsBanner mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.mas_equalTo(0);
+        make.width.mas_equalTo(KScreenWidth);
+        make.height.mas_equalTo(KScreenWidth+112+10);
+        make.bottom.mas_equalTo(0);
+    }];
+}
+
+- (void)configData:(id)Data{
+    GoodsInformationM *model = (GoodsInformationM *)Data;
+    
+    [self.goodsBanner tt_confignewdata:model];
+}
+
+
+- (WKM_goodsBanner *)goodsBanner {
+    if (!_goodsBanner) {
+        _goodsBanner = [[WKM_goodsBanner alloc] init];
+    }
+    return _goodsBanner;
+}
+
+@end

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

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

+ 14 - 0
Asteria/Fuction/Goods/V/ASGoodsCouponCell.m

@@ -0,0 +1,14 @@
+//
+//  ASGoodsCouponCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import "ASGoodsCouponCell.h"
+
+@implementation ASGoodsCouponCell
+
+
+
+@end

+ 21 - 0
Asteria/Fuction/Goods/V/ASGoodsDetailsSizeCell.h

@@ -0,0 +1,21 @@
+//
+//  ASGoodsDetailsSizeCell.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/18.
+//
+
+#import <WMBase/WMBase.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^ASGoodsDetailsSizeBlock)(NSArray<OptionsModel *> *optionArr, NSInteger num);
+
+@interface ASGoodsDetailsSizeCell : TT_BaseCell
+
+@property (nonatomic, copy) ASGoodsDetailsSizeBlock sizeBlock;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 114 - 0
Asteria/Fuction/Goods/V/ASGoodsDetailsSizeCell.m

@@ -0,0 +1,114 @@
+//
+//  ASGoodsDetailsSizeCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/18.
+//
+
+#import "ASGoodsDetailsSizeCell.h"
+#import "ASGoodsDetailsSizeSelView.h"
+
+@interface ASGoodsDetailsSizeCell()
+
+@property (nonatomic, strong) ASGoodsDetailsSizeSelView *sizeV;
+
+@property (nonatomic, strong) NSMutableArray <OptionsValuesM *>*selOptionArr;
+
+@end
+
+@implementation ASGoodsDetailsSizeCell
+
+- (void)setupSubviewS{
+        
+    [self.contentView addSubview:self.sizeV];
+    [self.sizeV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.width.mas_equalTo(KScreenWidth);
+        make.top.mas_equalTo(0);
+        make.height.equalTo(@300);
+        make.bottom.mas_equalTo(-10);
+    }];
+    K_WEAK_SELF;
+    self.sizeV.reloadHeight = ^(CGFloat h) {
+        K_STRONG_SELF;
+        [self.sizeV mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(0);
+            make.width.mas_equalTo(KScreenWidth);
+            make.top.mas_equalTo(0);
+            make.height.equalTo(@(h));
+            make.bottom.mas_equalTo(-10);
+        }];
+        [self reloadInputViews];
+        [self setNeedsDisplay];
+    };
+    self.sizeV.reloadPrice = ^{
+        K_STRONG_SELF;
+        [self updatePrice];
+    };
+    
+}
+
+- (void)updatePrice {
+    NSInteger num = self.sizeV.num;
+    NSMutableArray <OptionsValuesM *>*selMArr = [NSMutableArray array];
+    for (OptionsModel *m in self.sizeV.optionArr) {
+        if (m.optionSelectTag >= 0 && m.optionSelectTag < m.values.count) {
+            [selMArr addObject:m.values[m.optionSelectTag]];
+        }
+    }
+    [self tool_changePriceModel:selMArr goodCount:num];
+}
+
+-(void)tool_changePriceModel:(NSMutableArray <OptionsValuesM *>*)valueMAry goodCount:(NSInteger )goosNum{
+    self.selOptionArr = valueMAry;
+    
+    NSMutableDictionary *optionDic = [NSMutableDictionary dictionary];
+    for (OptionsModel *optionM in self.sizeV.optionArr) {
+        OptionsValuesM *valuesM = optionM.values[optionM.optionSelectTag];
+        NSString *tempStr =[NSString stringWithFormat:@"options[%@]",optionM.option_id];
+        optionDic[tempStr] =valuesM.option_type_id;
+    }
+    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:optionDic];
+    params[@"qty"] = [NSString stringWithFormat:@"%ld", self.sizeV.num];
+//    NSLog(@"=====%@", params);
+    if (self.currencyparameterClose) {
+        self.currencyparameterClose(100, params);
+    }
+}
+
+- (void)configData:(id)Data{
+    
+    GoodsInformationM *model = (GoodsInformationM *)Data;
+    
+    NSArray *modelAry  = model.options;
+
+    for (OptionsModel *m in modelAry) {
+        m.isLongValue = false;
+        if (m.is_require.boolValue) {
+            m.optionSelectTag = 0;
+        } else {
+            m.optionSelectTag = -1;
+        }
+        for (OptionsValuesM *val in m.values) {
+            if (val.title.length > 7) {
+                m.isLongValue = true;
+                break;
+            }
+        }
+    }
+    self.sizeV.optionArr = modelAry;
+    
+    self.sizeV.tipStr = model.description;
+}
+
+
+- (ASGoodsDetailsSizeSelView *)sizeV {
+    if(!_sizeV){
+        ASGoodsDetailsSizeSelView *v = [[ASGoodsDetailsSizeSelView alloc] initWithFrame:CGRectZero collectionViewLayout:[[UICollectionViewLayout alloc] init] ];
+        
+        _sizeV = v;
+    }
+    return _sizeV;
+}
+
+@end

+ 47 - 0
Asteria/Fuction/Goods/V/ASGoodsDetailsSizeSelView.h

@@ -0,0 +1,47 @@
+//
+//  ASGoodsDetailsSizeSelView.h
+//  westkissMob
+//
+//  Created by iOS on 2024/5/19.
+//
+
+#import <UIKit/UIKit.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsDetailsSizeSelView : UICollectionView
+
+@property (nonatomic, assign) NSInteger num;
+@property (nonatomic, copy) void(^reloadPrice)(void);
+
+
+@property (nonatomic, copy) void(^reloadHeight)(CGFloat h);
+
+@property (nonatomic, strong) NSArray<OptionsModel *> *optionArr;
+@property (nonatomic, copy) NSString *tipStr;
+
+@end
+
+@interface APProductDetailSizeCell : UICollectionViewCell
+
+- (void)setData:(OptionsValuesM *)m;
+
+- (void)setSelType:(BOOL)isSel isCat:(BOOL)isCat;
+- (void)setTip:(NSString *)tipStr;
+
+@end
+
+@interface APProductDetailNumStepCell : UICollectionViewCell
+
+@property (nonatomic, copy) void(^numBlock)(NSString *num);
+
+@end
+
+@interface APProductDetailSizeHeadV : UICollectionReusableView
+
+@property (nonatomic, strong) UILabel *titleLb;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 541 - 0
Asteria/Fuction/Goods/V/ASGoodsDetailsSizeSelView.m

@@ -0,0 +1,541 @@
+//
+//  ASGoodsDetailsSizeSelView.m
+//  westkissMob
+//
+//  Created by iOS on 2024/5/19.
+//
+
+#import "ASGoodsDetailsSizeSelView.h"
+
+@interface ASGoodsDetailsSizeSelView ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
+
+@end
+
+@implementation ASGoodsDetailsSizeSelView
+
+-(void)setTipStr:(NSString *)tipStr {
+    _tipStr = tipStr;
+    CGFloat h = 84;
+    for (OptionsModel *m in self.optionArr) {
+        if (m.isLongValue) {
+            if (m.values.count > 0) {
+                NSInteger numLine = m.values.count/2 + (m.values.count%2>0 ? 1 : 0);
+                h += 40 * numLine + 10*(numLine-1) + 20 + 28;
+            }
+        } else {
+            if (m.values.count > 0) {
+                NSInteger numLine = m.values.count/4 + (m.values.count%4>0 ? 1 : 0);
+                h += 40 * numLine + 10*(numLine-1) + 20+28;
+            }
+        }
+    }
+//    if (self.tipStr != nil && self.tipStr.length > 0) {
+//        h += 60;
+//    }
+    if (self.reloadHeight) {
+        self.reloadHeight(h);
+    }
+    if (self.reloadPrice){
+        self.reloadPrice();
+    }
+    [self reloadData];
+}
+
+- (void)setOptionArr:(NSArray<OptionsModel *> *)optionArr {
+    _optionArr = optionArr;
+    CGFloat h = 84;
+    for (OptionsModel *m in optionArr) {
+        if (m.isLongValue) {
+            if (m.values.count > 0) {
+                NSInteger numLine = m.values.count/2 + (m.values.count%2>0 ? 1 : 0);
+                h += 40 * numLine + 10*(numLine-1) + 20 + 28;
+            }
+        } else {
+            if (m.values.count > 0) {
+                NSInteger numLine = m.values.count/4 + (m.values.count%4>0 ? 1 : 0);
+                h += 40 * numLine + 10*(numLine-1) + 20+28;
+            }
+        }
+    }
+//    if (self.tipStr != nil && self.tipStr.length > 0) {
+//        h += 60;
+//    }
+    if (self.reloadHeight) {
+        self.reloadHeight(h);
+    }
+    if (self.reloadPrice){
+        self.reloadPrice();
+    }
+    [self reloadData];
+}
+
+- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout {
+    UICollectionViewFlowLayout *ly = [[UICollectionViewFlowLayout alloc] init];
+    ly.scrollDirection = UICollectionViewScrollDirectionVertical;
+    self = [super initWithFrame:frame collectionViewLayout:ly];
+    if (self) {
+        self.num = 1;
+        self.showsVerticalScrollIndicator = false;
+        self.showsHorizontalScrollIndicator = false;
+        self.scrollEnabled = false;
+        self.backgroundColor = Col_FFF;
+        self.delegate = self;
+        self.dataSource = self;
+        [self registCell];
+        [self reloadData];
+    }
+    return self;
+}
+
+
+- (void)registCell {
+    [self registerClass:[APProductDetailSizeHeadV class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"APProductDetailSizeHeadV"];
+    [self registerClass:[APProductDetailSizeCell class] forCellWithReuseIdentifier:@"APProductDetailSizeCell"];
+//    [self registerClass:[APProductDetailSizeCell class] forCellWithReuseIdentifier:@"tipCell"];
+    [self registerClass:[APProductDetailNumStepCell class] forCellWithReuseIdentifier:@"APProductDetailNumStepCell"];
+}
+
+// MARK: - UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout
+
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.section < self.optionArr.count) {
+        OptionsModel *m = self.optionArr[indexPath.section];
+        if ((!m.is_require.boolValue) && indexPath.row == m.optionSelectTag) {
+            m.optionSelectTag = -1;
+            if (self.reloadPrice) {
+                self.reloadPrice();
+            }
+            [collectionView reloadData];
+            return;
+        }
+        if (m.values.count > indexPath.row) {
+            m.optionSelectTag = indexPath.row;
+            if (self.reloadPrice) {
+                self.reloadPrice();
+            }
+            [collectionView reloadData];
+        }
+        
+    }
+}
+
+- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
+//    return self.optionArr.count + 1 + (self.tipStr == nil || self.tipStr.length == 0 ? 0 : 1);
+    return self.optionArr.count + 1;
+}
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    
+    if (section < self.optionArr.count) {
+        OptionsModel *m = self.optionArr[section];
+        return m.values.count;
+        
+    }
+    return 1;
+    
+}
+
+- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.section < self.optionArr.count) {
+        OptionsModel *m = self.optionArr[indexPath.section];
+        
+        APProductDetailSizeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"APProductDetailSizeCell" forIndexPath:indexPath];
+        if (indexPath.row < m.values.count) {
+            OptionsValuesM *val = m.values[indexPath.row];
+            [cell setData:val];
+        }
+        [cell setSelType:m.optionSelectTag == indexPath.row isCat:m.isLongValue];
+        return cell;
+        
+    }
+//    if (self.tipStr != nil && self.tipStr.length > 0 && indexPath.section == self.optionArr.count) {
+//        APProductDetailSizeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"APProductDetailSizeCell" forIndexPath:indexPath];
+//        [cell setTip:self.tipStr];
+//        return cell;
+//    }
+    APProductDetailNumStepCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"APProductDetailNumStepCell" forIndexPath:indexPath];
+    __weak typeof(self) weakSelf = self;
+    cell.numBlock = ^(NSString * _Nonnull num) {
+        weakSelf.num = num.integerValue;
+        if (self.reloadPrice) {
+            self.reloadPrice();
+        }
+    };
+    return cell;
+    
+}
+
+- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
+    if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
+        APProductDetailSizeHeadV *v = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"APProductDetailSizeHeadV" forIndexPath:indexPath];
+        if (indexPath.section < self.optionArr.count) {
+            OptionsModel *m = self.optionArr[indexPath.section];
+            v.titleLb.text = m.title;
+        } else {
+            v.titleLb.text = @"Category";
+        }
+        return v;
+    }
+    return [[UICollectionReusableView alloc] init];
+}
+
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.section < self.optionArr.count) {
+        OptionsModel *m = self.optionArr[indexPath.section];
+        if (m.isLongValue) {
+            CGFloat w = (SCREEN_WIDTH-30-10)/2;
+            return CGSizeMake(w, 40);
+        } else {
+            CGFloat w = (SCREEN_WIDTH-30-10*3)/4;
+            return CGSizeMake(w, 40);
+        }
+        
+    } else {
+        CGFloat w = (SCREEN_WIDTH-30);
+        return CGSizeMake(w, 72);
+    }
+    
+}
+
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
+    if (section >= self.optionArr.count){
+        return  CGSizeZero;
+    }
+    return CGSizeMake(SCREEN_WIDTH-30, 28);
+}
+
+- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
+    return 10;
+}
+
+- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
+    return 10;
+}
+
+- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
+    return UIEdgeInsetsMake(10, 15, 10, 15);
+}
+
+
+@end
+
+
+
+
+@interface APProductDetailSizeCell ()
+
+@property (nonatomic, strong) UIView *bgV;
+@property (nonatomic, strong) UIView *colorBg;
+@property (nonatomic, strong) UILabel *titleLb;
+@property (nonatomic, strong) UIImageView *selTipV;
+
+@end
+
+@implementation APProductDetailSizeCell
+
+- (void)setData:(OptionsValuesM *)m {
+    self.titleLb.text = m.title;
+}
+
+
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self loadSubV];
+    }
+    return self;
+}
+
+- (void)setSelType:(BOOL)isSel isCat:(BOOL)isCat {
+    self.colorBg.hidden = true;
+    self.bgV.layer.borderWidth = 1;
+    self.bgV.backgroundColor = _F8F8F8;
+    self.bgV.layer.borderColor = isSel ? _32CFB0.CGColor : Col_FFF.CGColor;
+    self.selTipV.hidden = !isSel;
+    self.titleLb.font = [UIFont fontWithName:(isSel ? Rob_Bold : Rob_Regular ) size:(isCat ? 12 : 14)];
+}
+
+- (void)setTip:(NSString *)tipStr {
+    self.selTipV.hidden = true;
+    self.bgV.layer.borderWidth = 0;
+    self.bgV.backgroundColor = UIColor.clearColor;
+    self.colorBg.hidden = false;
+    self.titleLb.text = tipStr;
+}
+
+
+- (void)loadSubV {
+    [self.contentView addSubview:self.colorBg];
+    [self.contentView addSubview:self.bgV];
+    
+    [self.colorBg mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.contentView);
+    }];
+    
+    [self.bgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.contentView);
+    }];
+    [self.bgV addSubview:self.titleLb];
+    [self.bgV addSubview:self.selTipV];
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.leading.equalTo(self.bgV).offset(4);
+        make.bottom.trailing.equalTo(self.bgV).offset(-4);
+    }];
+    [self.selTipV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.trailing.bottom.equalTo(self.bgV);
+        make.width.height.equalTo(@12);
+    }];
+    
+    
+}
+
+- (void)layoutSubviews {
+    [super layoutSubviews];
+    dispatch_async(dispatch_get_main_queue(), ^{
+//        [self.colorBg lineColor:@[(__bridge id)_FFD1B9.CGColor,(__bridge id)_FFF5F0.CGColor] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5) locations:@[@(0), @(1.0f)]];
+    });
+}
+
+- (UIView *)bgV {
+    if (!_bgV) {
+        UIView *v = [UIView baseV];
+        v.layer.borderWidth = 1;
+        v.backgroundColor = Col_FFF;
+        v.layer.borderColor = [UIColor colorWithHexString:@"#E6E6E6"].CGColor;
+        _bgV = v;
+    }
+    return _bgV;
+}
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textColor = Col_000;
+        lb.numberOfLines = 0;
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+- (UIImageView *)selTipV {
+    if (!_selTipV) {
+        UIImageView *imgv = [UIImageView baseImgV];
+        imgv.contentMode = UIViewContentModeScaleToFill;
+        imgv.image = [UIImage imageNamed:@"good_sizeSel"];
+        _selTipV = imgv;
+    }
+    return _selTipV;
+}
+
+- (UIView *)colorBg {
+    if (!_colorBg) {
+        UIView *v = [UIView baseV];
+        v.hidden = true;
+        _colorBg = v;
+    }
+    return _colorBg;
+}
+
+
+@end
+
+
+@interface APProductDetailNumStepCell ()
+
+@property (nonatomic, strong) UILabel *titleLb;
+@property (nonatomic, strong) UIButton *minusBt;
+@property (nonatomic, strong) UILabel *numLb;
+@property (nonatomic, strong) UIButton *addBt;
+
+@end
+
+@implementation APProductDetailNumStepCell
+
+- (void)addBtAction:(UIButton *)bt {
+//    [bt sleep:0.3];
+    NSInteger num = self.numLb.text.integerValue;
+    if (num < 1) {
+        num = 1;
+    } else {
+        num += 1;
+    }
+    NSString *numStr = [NSString stringWithFormat:@"%ld", num];
+    self.numLb.text = numStr;
+    if (self.numBlock) {
+        self.numBlock(numStr);
+    }
+    
+}
+
+- (void)minusBtAction:(UIButton *)bt {
+//    [bt sleep:0.3];
+    NSInteger num = self.numLb.text.integerValue;
+    if (num < 2) {
+        num = 1;
+    } else {
+        num -= 1;
+    }
+    NSString *numStr = [NSString stringWithFormat:@"%ld", num];
+    self.numLb.text = numStr;
+    if (self.numBlock) {
+        self.numBlock(numStr);
+    }
+    
+}
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.backgroundColor = UIColor.whiteColor;
+        [self loadSubV];
+    }
+    return self;
+}
+
+
+
+- (void)loadSubV {
+    
+    [self.contentView addSubview:self.titleLb];
+    [self.contentView addSubview:self.addBt];
+    [self.contentView addSubview:self.minusBt];
+    [self.contentView addSubview:self.numLb];
+//    if(num >= self.goodsmaxNum){
+//        [self.addBtn setTitleColor:[UIColor colorWithHexString:@"#E6E6E6"] forState:UIControlStateNormal];
+//        self.addBtn.userInteractionEnabled = NO;
+//    }else{
+//        [self.addBtn setTitleColor:[UIColor colorWithHexString:@"#0B0B0B"] forState:UIControlStateNormal];
+//        self.addBtn.userInteractionEnabled = YES;
+//    }
+//    if(num >= 2){
+//        [self.cutBtn setTitleColor:[UIColor colorWithHexString:@"#0B0B0B"] forState:UIControlStateNormal];
+//        self.cutBtn.userInteractionEnabled = YES;
+//    }else{
+//        [self.cutBtn setTitleColor:[UIColor colorWithHexString:@"#E6E6E6"] forState:UIControlStateNormal];
+//        self.cutBtn.userInteractionEnabled = NO;
+//    }
+    
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(20);
+        make.top.equalTo(self.contentView);
+        make.leading.equalTo(self.contentView);
+    }];
+    
+    [self.minusBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.height.mas_equalTo(32);
+        make.left.mas_equalTo(0);
+        make.top.equalTo(self.titleLb.mas_bottom).offset(10);
+        make.bottom.mas_equalTo(-10);
+    }];
+    
+    [self.numLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@32);
+        make.width.equalTo(@46);
+        make.left.equalTo(self.minusBt.mas_right).offset(1);
+        make.centerY.equalTo(self.minusBt);
+    }];
+    
+    [self.addBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.height.equalTo(@32);
+        make.left.equalTo(self.numLb.mas_right).offset(1);
+        make.centerY.equalTo(self.minusBt);
+    }];
+    
+}
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.textColor = Col_000;
+        lb.text = @"Quantity";
+        lb.font = [UIFont fontWithName:Rob_Bold size:16];
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+- (UIButton *)addBt {
+    if (!_addBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setImage:[UIImage imageNamed:@"goods_num_add"] forState:UIControlStateNormal];
+        bt.layer.borderWidth = 1;
+        bt.layer.borderColor = [UIColor colorWithHexString:@"#E6E6E6"].CGColor;
+        [bt addTarget:self action:@selector(addBtAction:) forControlEvents:UIControlEventTouchUpInside];
+        _addBt = bt;
+    }
+    return _addBt;
+}
+
+- (UILabel *)numLb {
+    if (!_numLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textColor = Col_000;
+        lb.layer.borderColor = Col_000.CGColor;
+        lb.layer.borderWidth = 1;
+        lb.text = @"1";
+        lb.font = [UIFont fontWithName:Rob_Bold size:16];
+        _numLb = lb;
+    }
+    return _numLb;
+}
+
+- (UIButton *)minusBt {
+    if (!_minusBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setImage:[UIImage imageNamed:@"goods_num_minus"] forState:UIControlStateNormal];
+        bt.layer.borderWidth = 1;
+        bt.layer.borderColor = [UIColor colorWithHexString:@"#E6E6E6"].CGColor;
+        [bt addTarget:self action:@selector(minusBtAction:) forControlEvents:UIControlEventTouchUpInside];
+        _minusBt = bt;
+    }
+    return _minusBt;
+}
+
+@end
+
+
+@interface APProductDetailSizeHeadV ()
+
+
+@end
+
+@implementation APProductDetailSizeHeadV
+
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.backgroundColor = Col_FFF;
+        [self loadSubV];
+    }
+    return self;
+}
+
+- (void)loadSubV {
+    [self addSubview:self.titleLb];
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self).offset(10);
+        make.bottom.equalTo(self);//.offset(-5);
+        make.leading.equalTo(self).offset(15);
+        make.trailing.equalTo(self).offset(-15);
+    }];
+}
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.textColor = Col_000;
+        lb.font = [UIFont fontWithName:Rob_Bold size:16];
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+@end

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

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

+ 85 - 0
Asteria/Fuction/Goods/V/ASGoodsDetailsTableView.m

@@ -0,0 +1,85 @@
+//
+//  ASGoodsDetailsTableView.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/17.
+//
+
+#import "ASGoodsDetailsTableView.h"
+
+#import "ASGoodsBannerCell.h"
+#import "ASGoodsDetailsSizeCell.h"
+#import "ASGoodsTitlePriceCell.h"
+#import "ASGoodsGuaranteeInfoCell.h"
+
+@implementation ASGoodsDetailsTableView
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    NSDictionary *dicData = self.infodata[indexPath.row];
+    
+    NSObject *objectM = [dicData objectForKey:@"data"];
+    NSString *typeStr = [dicData objectForKey:@"type"];
+    
+    if ([typeStr isEqualToString:@"banner"]) {
+        ASGoodsBannerCell *cell = [ASGoodsBannerCell cellWithTableView:tableView CellClass:[ASGoodsBannerCell class]];
+        
+        [cell configData:(GoodsInformationM *)objectM];
+        
+        return  cell;
+    } else if ([typeStr isEqualToString:@"titlePrice"]) {
+        ASGoodsTitlePriceCell *cell = [ASGoodsTitlePriceCell cellWithTableView:tableView CellClass:[ASGoodsTitlePriceCell class]];
+        
+        [cell configData:(GoodsInformationM *)objectM];
+        
+        @weakify(self)
+        cell.currencyparameterClose = ^(NSInteger type, id Data) {
+            @strongify(self)
+            [self generaltriggermethodType:type data:Data];
+        };
+        
+        return  cell;
+    } else if ([typeStr isEqualToString:@"size"]) {
+        ASGoodsDetailsSizeCell *cell = [ASGoodsDetailsSizeCell cellWithTableView:tableView CellClass:[ASGoodsDetailsSizeCell class]];
+        
+        [cell configData:(GoodsInformationM *)objectM];
+        
+        @weakify(self)
+        cell.currencyparameterClose = ^(NSInteger type, id Data) {
+            @strongify(self)
+            [self generaltriggermethodType:type data:Data];
+        };
+        
+        return  cell;
+    } else if ([typeStr isEqualToString:@"guarantee"]) {
+        ASGoodsGuaranteeInfoCell *cell = [ASGoodsGuaranteeInfoCell cellWithTableView:tableView CellClass:[ASGoodsGuaranteeInfoCell class]];
+        
+        [cell configData:(GoodsInformationM *)objectM];
+        
+        @weakify(self)
+        cell.currencyparameterClose = ^(NSInteger type, id Data) {
+            @strongify(self)
+            [self generaltriggermethodType:type data:Data];
+        };
+        
+        return  cell;
+    }
+    
+    return  nil;
+    
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+//    NSObject *objectM = self.infodata[indexPath.row];
+//    if([objectM isKindOfClass:[CartTotalsItemsM class]] && self.isFlod){
+//        return 0;
+//    }
+//    return 1;
+    
+    return UITableViewAutomaticDimension;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 200;
+}
+
+@end

+ 19 - 0
Asteria/Fuction/Goods/V/ASGoodsGuaranteeInfoCell.h

@@ -0,0 +1,19 @@
+//
+//  ASGoodsGuaranteeInfoCell.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import <WMBase/WMBase.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsGuaranteeInfoCell : TT_BaseCell
+
+@property (nonatomic, strong) GoodsInformationM *infoModel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 142 - 0
Asteria/Fuction/Goods/V/ASGoodsGuaranteeInfoCell.m

@@ -0,0 +1,142 @@
+//
+//  ASGoodsGuaranteeInfoCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import "ASGoodsGuaranteeInfoCell.h"
+#import "GoodsDetailsPayV.h"
+#import "GoodsDetailsIntroduceV.h"
+#import "RadioButton.h"
+
+@interface ASGoodsGuaranteeInfoCell()
+
+@property (nonatomic, strong) GoodsDetailsPayV *datails_payV;
+@property (nonatomic, strong) GoodsDetailsIntroduceV *datails_IntroduceV;
+@property (nonatomic, strong) NSMutableArray *radioBtnAry;
+@property (nonatomic, strong) UIButton *leftBtn;
+@property (nonatomic, strong) UIButton *rightBtn;
+
+@end
+
+@implementation ASGoodsGuaranteeInfoCell
+
+- (void)setupSubviewS{
+    
+    _radioBtnAry = [[NSMutableArray alloc] initWithCapacity:1];
+    
+    [self.contentView addSubview:self.datails_payV];
+    [self.contentView addSubview:self.datails_IntroduceV];
+    
+    [self.datails_payV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(10);
+        make.top.mas_equalTo(10);
+        make.width.mas_equalTo(KScreenWidth-20);
+        make.height.mas_equalTo(78);
+    }];
+    
+    [self.datails_IntroduceV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(10);
+        make.top.equalTo(self.datails_payV.mas_bottom).offset(10);
+        make.width.mas_equalTo(KScreenWidth-20);
+        make.height.mas_equalTo(120);
+    }];
+    
+    NSArray *titleAry = @[@"PRODUCT DETAILS",@"REVIEWS"];
+    for (int i= 0; i<titleAry.count; i++) {
+        UIButton *radBtn= [UIButton buttonWithType:UIButtonTypeCustom];
+        radBtn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+        radBtn.titleLabel.font = [UIFont fontWithName:Rob_Bold size:14];
+        radBtn.layer.cornerRadius = 4;
+        radBtn.clipsToBounds = YES;
+        radBtn.tag = i;
+        [radBtn setTitle:titleAry[i] forState:UIControlStateNormal];
+        [radBtn setTitleColor:[UIColor colorWithHexString:@"#000000"] forState:UIControlStateNormal];
+        [radBtn setTitleColor:[UIColor colorWithHexString:@"#FFFFFF"] forState:UIControlStateSelected];
+        [radBtn addTarget:self action:@selector(_onButtonClick:) forControlEvents:UIControlEventTouchUpInside];
+        [self.contentView addSubview:radBtn];
+//        [self.radioBtnAry addObject:radBtn];
+        CGFloat btnWidth = (KScreenWidth -30)/2;
+        [radBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(10+(10+btnWidth)*i);
+            make.height.mas_equalTo(40);
+            make.top.equalTo(self.datails_IntroduceV.mas_bottom).offset(20);
+            make.width.mas_equalTo(btnWidth);
+            make.bottom.mas_equalTo(-10);
+        }];
+        
+        if (i == 0) {
+            radBtn.selected = YES;
+            radBtn.backgroundColor = [UIColor colorWithHexString:@"#113632"];
+            self.leftBtn = radBtn;
+        } else {
+            radBtn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+            self.rightBtn = radBtn;
+        }
+    }
+//    RadioButton *firstBtn = self.radioBtnAry[0];
+//    [firstBtn setGroupButtons:self.radioBtnAry];
+//    [self.radioBtnAry[0] setSelected:YES];
+//    [self xxx_onRadioButtonValueChanged:self.radioBtnAry[0]];
+    
+    
+//    self.datails_payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,[model.final_prices floatValue]/4];
+
+}
+
+- (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];
+}
+
+-(void)_onButtonClick:(UIButton *)btn{
+    
+    int tag = (int)btn.tag;
+    if (tag == 0) {
+        if (self.leftBtn.isSelected) {
+            return;
+        }
+        self.leftBtn.selected = YES;
+        self.rightBtn.selected = NO;
+        self.leftBtn.backgroundColor = [UIColor colorWithHexString:@"#113632"];
+        self.rightBtn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+    } else {
+        if (self.rightBtn.isSelected) {
+            return;
+        }
+        self.rightBtn.selected = YES;
+        self.leftBtn.selected = NO;
+        self.rightBtn.backgroundColor = [UIColor colorWithHexString:@"#113632"];
+        self.leftBtn.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+    }
+
+    if (self.currencyparameterClose) {
+        self.currencyparameterClose(tag + 2, self.infoModel);
+    }
+}
+
+
+-(GoodsDetailsPayV *)datails_payV{
+    if (!_datails_payV) {
+        _datails_payV = [[GoodsDetailsPayV alloc]initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 78)];
+        _datails_payV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+        _datails_payV.layer.cornerRadius = 4;
+        _datails_payV.clipsToBounds = YES;
+    }
+    return _datails_payV;
+}
+
+- (GoodsDetailsIntroduceV *)datails_IntroduceV {
+    if (!_datails_IntroduceV) {
+        _datails_IntroduceV = [[GoodsDetailsIntroduceV alloc] initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 120)];
+        _datails_IntroduceV.backgroundColor = _F5F5F5;
+        _datails_IntroduceV.clipsToBounds = YES;
+    }
+    return _datails_IntroduceV;
+}
+
+@end

+ 23 - 0
Asteria/Fuction/Goods/V/ASGoodsIntrouduceWebView.h

@@ -0,0 +1,23 @@
+//
+//  ASGoodsIntrouduceWebView.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import <UIKit/UIKit.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^ASGoodsWebInfoLoadFinishBlock)(float webHeight);
+
+@interface ASGoodsIntrouduceWebView : UIView
+
+@property (nonatomic, copy) ASGoodsWebInfoLoadFinishBlock loadFinishBlock;
+
+- (void)loadWebUrlWithData:(GoodsInformationM *)model;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 146 - 0
Asteria/Fuction/Goods/V/ASGoodsIntrouduceWebView.m

@@ -0,0 +1,146 @@
+//
+//  ASGoodsIntrouduceWebView.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import "ASGoodsIntrouduceWebView.h"
+
+@interface ASGoodsIntrouduceWebView()<WKNavigationDelegate>
+
+@property (nonatomic, strong) WKWebView *wkWebView;
+
+@end
+
+@implementation ASGoodsIntrouduceWebView
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    if (self = [super initWithFrame:frame]) {
+        
+        [self addSubview:self.wkWebView];
+        [self.wkWebView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_equalTo(0);
+            make.top.mas_equalTo(10);
+            make.width.mas_equalTo(KScreenWidth);
+            make.height.mas_equalTo(200);
+//            make.bottom.mas_equalTo(-10);
+        }];
+    }
+    return self;
+}
+
+- (void)loadWebUrlWithData:(GoodsInformationM *)model {
+    NSString *product_details= @"";
+    for (NSDictionary *dic in model.custom_attributes) {
+        NSString *tmpStr= MM_str(dic[@"attribute_code"]);
+        if ([tmpStr isEqualToString:@"feature"]) {
+            product_details = MM_str(dic[@"value"]);
+        }
+    }
+    NSString *htmlStr = [NSString stringWithFormat:@"<html> \n"
+                         "<head> \n"
+                         "<meta charset=\"utf-8\" /> \n"
+                         "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no\" /> \n"
+                         "<style> \n"
+                             "*{ \n"
+                                 "padding: 5; \n"
+                                 "margin: 0; \n"
+                             "} \n"
+                             "table{ \n"
+                                 "width: 100%%; \n"
+                                 "border: 1px solid #A8A8A8; \n"
+                                 "border-collapse:collapse; \n"
+                             "} \n"
+                             "th{ \n"
+                                 "width: 30.42%%; \n"
+                                 "min-height: 36px; \n"
+                                 "padding: 10px; \n"
+                                 "border: 1px solid #A8A8A8; \n"
+                                 "font-size: 12px; \n"
+                                 "font-weight: bold; \n"
+                                 "color: #000; \n"
+                             "} \n"
+                             "td{ \n"
+                                 "width: 69.58%%; \n"
+                                 "min-height: 36px; \n"
+                                 "padding: 10px; \n"
+                                 "border: 1px solid #A8A8A8; \n"
+                                 "font-size: 12px; \n"
+                                 "font-weight: 400; \n"
+                                 "color: #000; \n"
+                                 "line-height: 16px; \n"
+                                 "word-break: break-word; \n"
+                             "} \n"
+                         "</style> \n"
+                         "</head> \n"
+                         "<body style=\"font-family: -apple-system,Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif;\">%@</body> \n"
+                         "</html>",product_details];
+    [self.wkWebView loadHTMLString:htmlStr baseURL:nil];
+}
+
+
+#pragma mark WKNavigationDelegate 计算webView
+-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
+    @weakify(self)
+    [webView evaluateJavaScript:@"document.body.offsetHeight" completionHandler:^(id _Nullable result, NSError * _Nullable error) {
+        @strongify(self)
+        CGFloat height = [result doubleValue]+40;
+        [self tool_webChangeFrame:height];
+    }];
+}
+
+-(void)tool_webChangeFrame:(CGFloat)height{
+    [self.wkWebView mas_updateConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(height);
+    }];
+    
+    if (self.loadFinishBlock) {
+        self.loadFinishBlock(height);
+    }
+}
+
+
+- (WKWebView *)wkWebView {
+    if(!_wkWebView){
+        NSString *injectionJSString = @"var script = document.createElement('meta');"
+        "script.name = 'viewport';"
+        "script.content=\"width=device-width, user-scalable=no\";"
+        "document.getElementsByTagName('head')[0].appendChild(script);";
+        
+        // CSS选中样式取消 ---禁用web 长按菜单里的查询、学习、共享等按钮,
+        NSString *css = @"body{-webkit-user-select:none;-webkit-user-drag:none;}";
+        NSMutableString *javascript = [NSMutableString string];
+        [javascript appendString:injectionJSString];
+        [javascript appendString:@"var style = document.createElement('style');"];
+        [javascript appendString:@"style.type = 'text/css';"];
+        [javascript appendFormat:@"var cssContent = document.createTextNode('%@');", css];
+        [javascript appendString:@"style.appendChild(cssContent);"];
+        [javascript appendString:@"document.body.appendChild(style);"];
+        
+        WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:javascript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
+        
+        WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init];
+        config.selectionGranularity = WKSelectionGranularityDynamic;
+        
+        WKUserContentController * wkUController = [[WKUserContentController alloc] init];
+        
+        [wkUController addUserScript:wkUScript];
+        
+        config.userContentController= wkUController;
+        WKPreferences *wkp = [WKPreferences new];
+        wkp.minimumFontSize = 12;
+        config.preferences = wkp;
+        _wkWebView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenWidth) configuration:config];
+        _wkWebView.navigationDelegate=self;
+        _wkWebView.backgroundColor=[UIColor colorWithHexString:@"#FFFFFF"];
+        _wkWebView.scrollView.scrollEnabled=NO;
+        _wkWebView.allowsLinkPreview = NO;
+        if(@available(iOS 16.4 , *)){
+            _wkWebView.inspectable = YES;
+        }
+    }
+    return _wkWebView;
+}
+
+@end

+ 19 - 0
Asteria/Fuction/Goods/V/ASGoodsTitlePriceCell.h

@@ -0,0 +1,19 @@
+//
+//  ASGoodsTitlePriceCell.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import <WMBase/WMBase.h>
+#import "GoodsInformationM.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsTitlePriceCell : TT_BaseCell
+
+@property (nonatomic, strong) GoodsInformationM *infoModel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 166 - 0
Asteria/Fuction/Goods/V/ASGoodsTitlePriceCell.m

@@ -0,0 +1,166 @@
+//
+//  ASGoodsTitlePriceCell.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/20.
+//
+
+#import "ASGoodsTitlePriceCell.h"
+
+@interface ASGoodsTitlePriceCell()
+
+@property (nonatomic, strong) QMUILabel *titleLab;
+@property (nonatomic, strong) QMUILabel *soldLab;
+@property (nonatomic, strong) QMUILabel *reviewsLab;
+@property (nonatomic, strong) QMUILabel *priceLab;
+@property (nonatomic, strong) QMUILabel *saveLab;
+
+@end
+
+@implementation ASGoodsTitlePriceCell
+
+- (void)setupSubviewS{
+    
+//    self.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+    
+    [self.contentView addSubview:self.titleLab];
+    [self.contentView addSubview:self.soldLab];
+    [self.contentView addSubview:self.reviewsLab];
+    [self.contentView addSubview:self.priceLab];
+    [self.contentView addSubview:self.saveLab];
+    
+    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(10);
+        make.width.mas_equalTo(KScreenWidth-20);
+        make.top.mas_equalTo(10);
+        make.height.mas_lessThanOrEqualTo(45);
+    }];
+    [self.soldLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(10);
+        make.height.mas_equalTo(16);
+        make.top.equalTo(self.titleLab.mas_bottom).offset(10);
+    }];
+    [self.reviewsLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(self.titleLab.mas_right);
+        make.height.mas_equalTo(16);
+        make.top.equalTo(self.titleLab.mas_bottom).offset(10);
+    }];
+    [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(10);
+        make.top.equalTo(self.reviewsLab.mas_bottom).offset(20);
+        make.height.mas_equalTo(24);
+        make.bottom.mas_equalTo(-10);
+    }];
+    [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);
+    }];
+    
+    
+}
+
+- (void)configData:(id)Data{
+    GoodsInformationM *model = (GoodsInformationM *)Data;
+    
+    _infoModel = model;
+    
+    self.titleLab.text =MM_str(model.name);
+    self.soldLab.text = [NSString stringWithFormat:@"SOLD: %@",model.sold] ;
+    NSMutableAttributedString *reviewsStr = [[NSMutableAttributedString alloc]
+                                             initWithString:[NSString stringWithFormat:@"REVIEWS:%@",model.review_nums]];
+    NSRange contentRange = {0,[reviewsStr length]};
+    [reviewsStr addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
+    self.reviewsLab.attributedText = reviewsStr;
+    self.reviewsLab.textAlignment = NSTextAlignmentRight;
+    
+    NSMutableAttributedString *priceAtr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",model.currency_symbol,model.final_prices]];
+    [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)];
+    NSString *saveStr = @"";
+    if(model.final_prices == model.price){
+        self.saveLab.hidden = YES;
+    }else{
+        self.saveLab.hidden = NO;
+        double savePrice = [model.price doubleValue]-[model.final_prices doubleValue];
+        saveStr = [NSString stringWithFormat:@"Save %@%.2f",model.currency_symbol,savePrice];
+        [priceAtr appendAttributedString:[[NSAttributedString alloc]initWithString:@"  "]];
+        NSMutableAttributedString *priceAtrSub1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",model.price]];
+        [priceAtrSub1 addAttribute:NSForegroundColorAttributeName
+                        value:[UIColor colorWithHexString:@"#8c8c8c"]
+                        range:NSMakeRange(0, priceAtrSub1.length)];
+        [priceAtrSub1 addAttribute:NSFontAttributeName
+                        value:[UIFont fontWithName:Rob_Regular size:14]
+                        range:NSMakeRange(0, priceAtrSub1.length)];
+        [priceAtrSub1 addAttribute:NSStrikethroughStyleAttributeName
+                        value:[NSNumber numberWithInteger:NSUnderlineStyleSingle]
+                        range:NSMakeRange(0, priceAtrSub1.length)];
+        [priceAtr appendAttributedString:priceAtrSub1];
+    }
+    self.priceLab.attributedText = priceAtr;
+    self.infoModel.priceAtr = priceAtr;
+    self.saveLab.text = saveStr;
+}
+
+
+-(void)tap_reviewsClick{
+    if (self.currencyparameterClose) {
+        self.currencyparameterClose(1, self.infoModel);
+    }
+}
+
+
+- (QMUILabel *)titleLab {
+    if (!_titleLab) {
+        _titleLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
+        _titleLab.textAlignment = NSTextAlignmentLeft;
+        _titleLab.numberOfLines = 2;
+        _titleLab.textColor = [UIColor colorWithHexString:@"#000000"];
+        _titleLab.font = [UIFont fontWithName:Rob_Bold size:16];
+    }
+    return  _titleLab;
+}
+- (QMUILabel *)soldLab {
+    if (!_soldLab) {
+        _soldLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
+        _soldLab.textAlignment = NSTextAlignmentLeft;
+        _soldLab.textColor = [UIColor colorWithHexString:@"#666666"];
+        _soldLab.font = [UIFont systemFontOfSize:12];
+    }
+    return  _soldLab;
+}
+- (QMUILabel *)reviewsLab {
+    if (!_reviewsLab) {
+        _reviewsLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
+        _reviewsLab.textAlignment = NSTextAlignmentRight;
+        _reviewsLab.textColor = [UIColor colorWithHexString:@"#666666"];
+        _reviewsLab.font = [UIFont fontWithName:Rob_Regular size:12];
+        _reviewsLab.userInteractionEnabled = YES;
+        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap_reviewsClick)];
+        [_reviewsLab addGestureRecognizer:tap];
+        //    reviewsStr.underlineStyle = NSUnderlineStyleSingle;
+    }
+    return  _reviewsLab;
+}
+- (QMUILabel *)priceLab {
+    if (!_priceLab) {
+        _priceLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
+        _priceLab.textAlignment = NSTextAlignmentLeft;
+        _priceLab.textColor = [UIColor blackColor];
+        _priceLab.font = [UIFont systemFontOfSize:18];
+    }
+    return  _priceLab;
+}
+- (QMUILabel *)saveLab {
+    if (!_saveLab) {
+        _saveLab = [[QMUILabel alloc] initWithFrame:CGRectZero];
+        _saveLab.contentEdgeInsets= UIEdgeInsetsMake(10, 10, 10, 10);
+        _saveLab.backgroundColor = [UIColor colorWithHexString:@"#E0FFF5"];
+        _saveLab.textAlignment = NSTextAlignmentCenter;
+        _saveLab.textColor = [UIColor colorWithHexString:@"#113632"];
+        _saveLab.font = [UIFont fontWithName:Rob_Bold size:12];
+    }
+    return  _saveLab;
+}
+
+@end

+ 4 - 4
Asteria/Fuction/Goods/V/GoodsDetailsBottomV.m

@@ -13,10 +13,10 @@
 @implementation GoodsDetailsBottomV
 
 - (void)tt_setupViews{
-    UIView *lineV = [[UIView alloc]init];
-    lineV.backgroundColor = [UIColor colorWithHexString:@"#666666"];
-    lineV.frame = CGRectMake(0, 0, KScreenWidth, 0.5);
-    [self addSubview:lineV];
+//    UIView *lineV = [[UIView alloc]init];
+//    lineV.backgroundColor = [UIColor colorWithHexString:@"#666666"];
+//    lineV.frame = CGRectMake(0, 0, KScreenWidth, 0.5);
+//    [self addSubview:lineV];
     [self addSubview:self.shopBtn];
     [self addSubview:self.addCartBtn];
     [self btnSetCornRious];

+ 18 - 0
Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.h

@@ -0,0 +1,18 @@
+//
+//  ASGoodsDetailsViewController.h
+//  Asteria
+//
+//  Created by xingyu on 2024/5/17.
+//
+
+#import <WMBase/WMBase.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASGoodsDetailsViewController : UCMBaseC
+
+@property (nonatomic, copy) NSString *entity_id;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 190 - 0
Asteria/Fuction/Goods/VC/ASGoodsDetailsViewController.m

@@ -0,0 +1,190 @@
+//
+//  ASGoodsDetailsViewController.m
+//  Asteria
+//
+//  Created by xingyu on 2024/5/17.
+//
+
+#import "ASGoodsDetailsViewController.h"
+#import "AS_GoodsReviewsListC.h"
+#import "Cart_CheckoutC.h"
+
+#import "ASGoodsDetailsVM.h"
+#import "ASGoodsDetailsTableView.h"
+
+#import "ASGoodsIntrouduceWebView.h"
+#import "GoodsDetailsBottomV.h"
+
+#import "GoodsInformationM.h"
+
+
+#import "WKM_goodsBanner.h"
+
+@interface ASGoodsDetailsViewController ()<RY_baseVMprotocol>
+
+
+@property (nonatomic, strong) ASGoodsDetailsVM *VM;
+@property (nonatomic, strong) ASGoodsDetailsTableView *TableV;
+
+@property (nonatomic, strong) GoodsInformationM *model;
+
+@property (nonatomic, strong) WKM_goodsBanner *goodsBanner;
+
+@property (nonatomic, strong)  UIView *footView;
+
+@property (nonatomic, strong) GoodsDetailsBottomV *bottomV;
+//尺寸数据
+@property (nonatomic, strong) NSDictionary *sizeParam;
+//底部按钮点击类型
+@property (nonatomic, assign) NSInteger bottomClickType;
+
+@end
+
+@implementation ASGoodsDetailsViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    [self reqNet_GoodsDetails_productGetProduct];
+}
+
+- (void)initSubviews {
+    [super initSubviews];
+    
+    [self.view addSubview:self.bottomV];
+    @weakify(self)
+    self.bottomV.ViewtapClose = ^(NSInteger num, id  _Nonnull data) {
+        @strongify(self)
+        self.bottomClickType = num;
+        [self reqNet_Size_rewriteCartAddProducts];
+    };
+    
+    IPhoneXHeigh
+    [self setupTableV:[ASGoodsDetailsTableView class] Frame:CGRectMake(0, securitytop_Y , KScreenWidth, KScreenHeight - securitytop_Y - securityBottom_H - 65)];
+    self.TableV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
+    
+    K_WEAK_SELF;
+    self.TableV.tapClose = ^(NSInteger num, id data) {
+        K_STRONG_SELF;
+        if (num == 1) {//查看评论
+            [self action_GoodsReviewsListC];
+        } else if (num == 2) {//商品web详情
+            self.TableV.tableFooterView = self.footView;
+        } else if (num == 3) {//商品评论
+            self.TableV.tableFooterView = nil;
+        } else if (num == 100) {
+            self.sizeParam = (NSDictionary *)data;
+        }
+    };
+    
+}
+
+-(void)reqNet_Size_rewriteCartAddProducts {
+    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:self.sizeParam];
+    params[@"product"] =  self.model.Id;
+    NSLog(@"=====%@", params);
+    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+    [self.VM ry_formDataRequestPostApi:Size_rewriteCartAddProducts param:params];
+}
+
+-(void)reqNet_GoodsDetails_productGetProduct{
+    NSMutableDictionary * params = [[NSMutableDictionary alloc] init];
+//    [params setObject:@"55475" forKey:@"productId"];
+    [params setObject:self.entity_id forKey:@"productId"];
+    [params setObject:@"USD" forKey:@"currencyCode"];
+    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+    [self.VM ry_requestGetApi:Goods_productGetProductsById param:params];
+}
+-(void)ry_respnsData:(nullable id)data
+            parseAry:(nullable NSMutableArray *)arry
+              sucess:(BOOL)sucessOrFail
+                mark:(NSString *)mark
+          reqNetType:(ReqNetType)reqNetType{
+    [MBProgressHUD hideHUDForView:self.view animated:YES];
+    if(sucessOrFail){
+        if([mark isEqualToString:Goods_productGetProductsById]){
+            GoodsInformationM *model = (GoodsInformationM *)[arry firstObject];
+            self.model = model;
+            self.title = model.name;
+            
+            [self updateGoodsDetailsData];
+        } else if([mark isEqualToString:Size_rewriteCartAddProducts]) {            
+            
+            [self.view makeToast:@"Success" duration:2 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
+                if (self.bottomClickType == 1) {
+                    Cart_CheckoutC *vc = [[Cart_CheckoutC alloc] init];
+                    [[Current_normalTool topViewController].navigationController pushViewController:vc animated:YES];
+                }
+            }];
+        }
+    }
+}
+
+- (void)updateGoodsDetailsData {
+        
+    //商品图
+    NSDictionary *banner = @{@"type":@"banner", @"data":self.model};
+    [self.TableV.infodata addObject:banner];
+    //商品名、价格
+    NSDictionary *titlePrice = @{@"type":@"titlePrice", @"data":self.model};
+    [self.TableV.infodata addObject:titlePrice];
+    //规格
+    NSDictionary *goodsSize = @{@"type":@"size", @"data":self.model};
+    [self.TableV.infodata addObject:goodsSize];
+    //保障信息
+    NSDictionary *guarantee = @{@"type":@"guarantee", @"data":self.model};
+    [self.TableV.infodata addObject:guarantee];
+//    //介绍
+//    NSDictionary *webIntroduce = @{@"type":@"webIntroduce", @"data":self.model};
+//    [self.TableV.infodata addObject:webIntroduce];
+    
+    [self loadWebString];
+    
+    
+    [self.TableV reloadData];
+}
+
+- (void)loadWebString {
+    _footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 0.001)];
+    
+    self.TableV.tableFooterView = _footView;
+    
+    ASGoodsIntrouduceWebView *webInfoView = [[ASGoodsIntrouduceWebView alloc] initWithFrame:CGRectZero];
+    [_footView addSubview:webInfoView];
+    [webInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.mas_equalTo(0);
+    }];
+    [webInfoView loadWebUrlWithData:self.model];
+    K_WEAK_SELF;
+    webInfoView.loadFinishBlock = ^(float webHeight) {
+        K_STRONG_SELF;
+        
+        self.footView.frame = CGRectMake(0, 0, KScreenWidth, webHeight);
+        [self.TableV reloadData];
+    };
+}
+
+#pragma mark ---- Touch Event ----
+//查看评论
+-(void)action_GoodsReviewsListC{
+    AS_GoodsReviewsListC *allPic = [[AS_GoodsReviewsListC alloc]init];
+    allPic.goodsM = self.model;
+    [self.navigationController pushViewController:allPic animated:YES];
+}
+
+- (void)ucm_bindvmmodel{
+    self.VM = [[ASGoodsDetailsVM alloc] initDelegate:self];
+}
+
+- (GoodsDetailsBottomV *)bottomV {
+    if (!_bottomV) {
+        IPhoneXHeigh
+        _bottomV = [[GoodsDetailsBottomV alloc] initWithFrame:CGRectMake(0, KScreenHeight - securityBottom_H-65, KScreenWidth, securityBottom_H+65)];
+        _bottomV.backgroundColor = Col_FFF;
+        
+    }
+    return _bottomV;
+}
+
+
+@end

+ 1 - 1
Asteria/Product/CTMediatoaTargets/CTMediator+ASTargerts.m

@@ -18,7 +18,7 @@
 }
 
 -(UIViewController *)Goods_GoodsDetailsC:(NSDictionary *)params{
-    return [self performTarget:@"Goods" action:@"AS_GoodsDetailsC" params:params shouldCacheTarget:NO];
+    return [self performTarget:@"Goods" action:@"ASGoodsDetailsViewController" params:params shouldCacheTarget:NO];
 }
 -(UIViewController *)Goods_GoodsSizeC:(NSDictionary *)params{
     return [self performTarget:@"Goods" action:@"AS_GoodsSizeC" params:params shouldCacheTarget:NO];