hjx 1 anno fa
parent
commit
42db069678
26 ha cambiato i file con 150 aggiunte e 179 eliminazioni
  1. 6 0
      TOKTOK/TOKTOK.xcodeproj/project.pbxproj
  2. 3 0
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsGoodsTableViewController.h
  3. 13 10
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsGoodsTableViewController.m
  4. 50 0
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsModel.h
  5. 41 0
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsModel.m
  6. 1 1
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.h
  7. 32 18
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.m
  8. 2 18
      TOKTOK/TOKTOK/Home/BlindBox/Order/XSTTBlindBoxToOrderTableViewController.m
  9. 0 12
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_入门.imageset/Contents.json
  10. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_入门.imageset/入门.pdf
  11. 0 12
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_季节.imageset/Contents.json
  12. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_季节.imageset/季节.pdf
  13. 0 12
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_酿造.imageset/Contents.json
  14. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_酿造.imageset/酿造.pdf
  15. 0 12
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_高端.imageset/Contents.json
  16. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_高端.imageset/高端.pdf
  17. 0 21
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_入门.imageset/Contents.json
  18. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_入门.imageset/详情_入门.png
  19. 0 21
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_季节.imageset/Contents.json
  20. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_季节.imageset/详情_季节.png
  21. 0 21
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_酿造.imageset/Contents.json
  22. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_酿造.imageset/详情_酿造.png
  23. 0 21
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_高端.imageset/Contents.json
  24. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_高端.imageset/详情_高端.png
  25. 1 0
      TOKTOK/TOKTOK/Public/Profile/XSTTURLApiProfile.h
  26. 1 0
      TOKTOK/TOKTOK/Public/Profile/XSTTURLApiProfile.m

+ 6 - 0
TOKTOK/TOKTOK.xcodeproj/project.pbxproj

@@ -134,6 +134,7 @@
 		84B9184E29F28858003CF0A0 /* XSTTBlindBoxDetailsTipsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B9184D29F28858003CF0A0 /* XSTTBlindBoxDetailsTipsViewController.m */; };
 		84CADD132A1CA7F1004B0600 /* t_xstt_city_data.db in Resources */ = {isa = PBXBuildFile; fileRef = 84CADD122A1CA7F1004B0600 /* t_xstt_city_data.db */; };
 		84CADD162A1DEEF9004B0600 /* XSTTBlindBoxToOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CADD152A1DEEF9004B0600 /* XSTTBlindBoxToOrderModel.m */; };
+		84CADD192A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CADD182A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.m */; };
 		84CD5AF929F7719E00531BB6 /* AppDelegate+XSTTPushNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CD5AF829F7719E00531BB6 /* AppDelegate+XSTTPushNotification.m */; };
 		84CD5AFD2A04E7BE00531BB6 /* XSTTBeerDetailsRadarMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CD5AFC2A04E7BE00531BB6 /* XSTTBeerDetailsRadarMapView.m */; };
 		84D3FCDD268C45DE00D61979 /* UIControl+XSTTButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D3FCDC268C45DE00D61979 /* UIControl+XSTTButton.m */; };
@@ -418,6 +419,8 @@
 		84CADD122A1CA7F1004B0600 /* t_xstt_city_data.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = t_xstt_city_data.db; sourceTree = "<group>"; };
 		84CADD142A1DEEF9004B0600 /* XSTTBlindBoxToOrderModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTBlindBoxToOrderModel.h; sourceTree = "<group>"; };
 		84CADD152A1DEEF9004B0600 /* XSTTBlindBoxToOrderModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XSTTBlindBoxToOrderModel.m; sourceTree = "<group>"; };
+		84CADD172A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTBlindBoxDetailsModel.h; sourceTree = "<group>"; };
+		84CADD182A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XSTTBlindBoxDetailsModel.m; sourceTree = "<group>"; };
 		84CD5AF729F7719E00531BB6 /* AppDelegate+XSTTPushNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+XSTTPushNotification.h"; sourceTree = "<group>"; };
 		84CD5AF829F7719E00531BB6 /* AppDelegate+XSTTPushNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+XSTTPushNotification.m"; sourceTree = "<group>"; };
 		84CD5AFB2A04E7BE00531BB6 /* XSTTBeerDetailsRadarMapView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTBeerDetailsRadarMapView.h; sourceTree = "<group>"; };
@@ -1051,6 +1054,8 @@
 			children = (
 				84B9184629F23C61003CF0A0 /* XSTTBlindBoxDetailsViewController.h */,
 				84B9184729F23C61003CF0A0 /* XSTTBlindBoxDetailsViewController.m */,
+				84CADD172A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.h */,
+				84CADD182A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.m */,
 				84B9184C29F28858003CF0A0 /* XSTTBlindBoxDetailsTipsViewController.h */,
 				84B9184D29F28858003CF0A0 /* XSTTBlindBoxDetailsTipsViewController.m */,
 				84B9184929F27579003CF0A0 /* XSTTBlindBoxDetailsGoodsTableViewController.h */,
@@ -1650,6 +1655,7 @@
 				849C706C28BCAA7D00BE760C /* XSTTStoreListViewController.m in Sources */,
 				84287A6F29DE74260037FD51 /* XSTTBlindBoxToOrderTableViewController.m in Sources */,
 				847C8788269441C300BEBD03 /* XSTTHomeViewController.m in Sources */,
+				84CADD192A1F0DD5004B0600 /* XSTTBlindBoxDetailsModel.m in Sources */,
 				84D748F2268426AF00AD7C92 /* UIViewController+XSTTNetworkManager.m in Sources */,
 				84B9184829F23C61003CF0A0 /* XSTTBlindBoxDetailsViewController.m in Sources */,
 				84FA74D1268032EA0068C5EE /* SceneDelegate.m in Sources */,

+ 3 - 0
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsGoodsTableViewController.h

@@ -6,6 +6,7 @@
 //
 
 #import "XSTTTableViewController.h"
+@class XSTTBlindBoxDetailsGoodsModel;
 
 #define xstt_blindBoxDetailsgoodsTableViewHeaderHeight 24
 #define xstt_blindBoxDetailsgoodsTableViewRowHeight 160
@@ -15,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface XSTTBlindBoxDetailsGoodsTableViewController : XSTTTableViewController
 
+@property (nonatomic, strong) NSArray<XSTTBlindBoxDetailsGoodsModel *> *xstt_dataArray;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 13 - 10
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsGoodsTableViewController.m

@@ -7,6 +7,8 @@
 
 #import "XSTTBlindBoxDetailsGoodsTableViewController.h"
 #import "XSTTUIGeneralHeader.h"
+#import "XSTTBlindBoxDetailsModel.h"
+#import <UIImageView+WebCache.h>
 
 @interface XSTTBlindBoxDetailsGoodsTableViewCell : UITableViewCell {
     UIImageView *_image;
@@ -26,7 +28,7 @@
 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
     self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
     if (!self) return nil;
-    
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
     _image = UIImageView.new;
     [_image setLayerCornerRadius:4 clipToBounds:false];
     [self.contentView addSubview:_image];
@@ -128,15 +130,16 @@
     return self;
 }
 
-- (void)reloadData:(NSIndexPath *)data line:(bool)line {
+- (void)reloadData:(XSTTBlindBoxDetailsGoodsModel *)data line:(bool)line {
     _image.backgroundColor = HEX_COLOR(#F7DDAA);
+    [_image sd_setImageWithURL:[NSURL URLWithString:data.xstt_beerImg]];
     _line.hidden = !line;
-    _name.text = @"北野武摩卡咖啡氮气世涛";
-    _price.text = @"¥269.00";
-    _specification.text = @"规格3L";
-    _p.text = @"22.5°P";
-    _vol.text = @"4.8%vol";
-    _ibu.text = @"15 IBU";
+    _name.text = data.xstt_name;
+    _price.text = [NSString stringWithFormat:@"¥%.2lf", data.xstt_price.floatValue];
+    _specification.text = [NSString stringWithFormat:@"规格%@", data.xstt_sp];
+    _p.text = [NSString stringWithFormat:@"%@°P", data.xstt_plato];
+    _vol.text = [NSString stringWithFormat:@"%@%%vol", data.xstt_abv];
+    _ibu.text = [NSString stringWithFormat:@"%@ IBU", data.xstt_ibu];
 }
 
 @end
@@ -172,12 +175,12 @@ static NSString * const reuseIdentifier = @"XSTTBlindBoxDetailsGoodsTableViewCel
     if (!cell) {
         cell = [[XSTTBlindBoxDetailsGoodsTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
     }
-    [cell reloadData:indexPath line:indexPath.row != 2];
+    [cell reloadData:_xstt_dataArray[indexPath.row] line:indexPath.row != _xstt_dataArray.count - 1];
     return cell;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return 3;
+    return _xstt_dataArray.count;
 }
 
 

+ 50 - 0
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsModel.h

@@ -0,0 +1,50 @@
+//
+//  XSTTBlindBoxDetailsModel.h
+//  TOKTOK
+//
+//  Created by shanp on 2023/5/25.
+//
+
+#import "XSTTBaseNetworkModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface XSTTBlindBoxDetailsGoodsModel : XSTTBaseNetworkModel
+
+@property (nonatomic, strong) NSString *xstt_abv;
+@property (nonatomic, strong) NSString *xstt_beerImg;
+@property (nonatomic, strong) NSString *xstt_ibu;
+@property (nonatomic, strong) NSString *xstt_name;
+@property (nonatomic, strong) NSString *xstt_plato;
+@property (nonatomic, strong) NSString *xstt_price;
+@property (nonatomic, strong) NSString *xstt_sp;
+
+@end
+
+@interface XSTTBlindBoxDetailsPriceModel : XSTTBaseNetworkModel
+
+@property (nonatomic, strong) NSString *xstt_maxNum;
+@property (nonatomic, strong) NSString *xstt_price;
+@property (nonatomic, strong) NSString *xstt_priceId;
+@property (nonatomic, strong) NSString *xstt_productCunt;
+@property (nonatomic, strong) NSString *xstt_unitType;
+
+@end
+
+@interface XSTTBlindBoxDetailsModel : XSTTBaseNetworkModel
+
+@property (nonatomic, strong) NSString *xstt_boxDetailId;
+@property (nonatomic, strong) NSString *xstt_boxName;
+@property (nonatomic, strong) NSString *xstt_boxNo;
+@property (nonatomic, strong) NSString *xstt_detailBg;
+@property (nonatomic, strong) NSString *xstt_details;
+@property (nonatomic, strong) NSString *xstt_price;
+@property (nonatomic, strong) NSString *xstt_title;
+@property (nonatomic, strong) NSString *xstt_cutOffTime;
+@property (nonatomic, strong) NSArray<NSString *> *xstt_desList;
+@property (nonatomic, strong) NSArray<XSTTBlindBoxDetailsGoodsModel *> *xstt_beerList;
+@property (nonatomic, strong) NSArray<XSTTBlindBoxDetailsPriceModel *> *xstt_priceList;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 41 - 0
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsModel.m

@@ -0,0 +1,41 @@
+//
+//  XSTTBlindBoxDetailsModel.m
+//  TOKTOK
+//
+//  Created by shanp on 2023/5/25.
+//
+
+#import "XSTTBlindBoxDetailsModel.h"
+
+@implementation XSTTBlindBoxDetailsModel
+
+- (id)GETxstt_beerListWithDictionary:(nullable NSDictionary *)dic key:(NSString *)key {
+    return [XSTTBlindBoxDetailsGoodsModel getModelListWithArray:dic[key]];
+}
+
+- (id)GETxstt_priceListWithDictionary:(nullable NSDictionary *)dic key:(NSString *)key {
+    return [XSTTBlindBoxDetailsPriceModel getModelListWithArray:dic[key]];
+}
+
+- (id)GETxstt_desListWithDictionary:(nullable NSDictionary *)dic key:(NSString *)key {
+    if (dic[key] && [dic[key] isKindOfClass:[NSArray class]]) {
+        NSMutableArray *res = NSMutableArray.new;
+        for (id item in dic[key]) {
+            if ([item isKindOfClass:[NSString class]]) {
+                [res addObject:item];
+            }
+        }
+        return res;
+    }
+    return @[];
+}
+
+@end
+
+@implementation XSTTBlindBoxDetailsGoodsModel
+
+@end
+
+@implementation XSTTBlindBoxDetailsPriceModel
+
+@end

+ 1 - 1
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.h

@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface XSTTBlindBoxDetailsViewController : UIViewController
 
-@property (nonatomic, strong) UIImage *xstt_image;
+@property (nonatomic, strong) NSString *xstt_boxId;
 
 @end
 

+ 32 - 18
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.m

@@ -13,6 +13,10 @@
 #import "XSTTBlindBoxDetailsGoodsTableViewController.h"
 #import "XSTTBlindBoxPayViewController.h"
 #import "XSTTBlindBoxDetailsTipsViewController.h"
+#import "UIViewController+XSTTNetworkManager.h"
+#import "XSTTBusinessManager.h"
+#import "XSTTBlindBoxDetailsModel.h"
+#import <UIImageView+WebCache.h>
 
 @interface XSTTBlindBoxDetailsViewController ()<UIScrollViewDelegate> {
     UIImageView *_topView;
@@ -20,6 +24,7 @@
     UIButton *_buyButton;
     UIView *_infoView;
     XSTTBlindBoxDetailsGoodsTableViewController *_goodsVC;
+    XSTTBlindBoxDetailsModel *_data;
 }
 
 @end
@@ -28,7 +33,8 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    [self setupUI];
+    self.xstt_isHiddenNavigationBar = true;
+    [self getData];
 }
 
 
@@ -42,6 +48,18 @@
 }
 
 #pragma mark - Network Action
+- (void)getData {
+    [self networkUseMethod:XSTTNetworkMethodGET loadingTips:XSTTGetDataLoadingCommonTips isLogin:xstt_isLogin() signKey:XSTTNetworkSignKeyApp url:xstt_appUrl(XSTTURLGetBlindBoxDetails) urlParameters:nil parameters:^NSDictionary * _Nonnull{
+        return @{@"boxId": self->_xstt_boxId};
+    } success:^NSString * _Nullable(NSError * _Nonnull error, id  _Nullable data) {
+        self->_data = [XSTTBlindBoxDetailsModel getModelWithDictionary:data[@"data"]];
+        [self setupUI];
+        return @"";
+    } failure:^NSString * _Nullable(NSError * _Nonnull error, id  _Nullable data) {
+        [self.navigationController popViewControllerAnimated:true];
+        return XSTTGetDataFailureCommonTips;
+    }];
+}
 
 #pragma mark - UIScrollViewDelegate
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
@@ -52,7 +70,6 @@
 
 #pragma mark - UI
 - (void)setupUI {
-    self.xstt_isHiddenNavigationBar = true;
     [self createBgView];
     [self createNavigationBar];
     [self scrollViewDidScroll:_bgView];
@@ -65,11 +82,7 @@
 
 - (void)createTipsView {
     UIView *des = [self createTipsViewWithTitle:@"订阅说明" tips:
-                   @[@"订购的盲盒会有数量限制, 且先到先得, 推荐一次订购多期, 优先参与每期订购活动, 每月酒款会根据相关因素调整",
-                     @"订购的盲盒会有数量限制, 且先到先得, 推荐一次订购多期, 优先参与每期订购活动, 每月酒款会根据相关因素调整",
-                     @"到截止日期后的3个工作日内, 我们会将盲盒惊喜陆续配送",
-                     @"可在“首页-我的-我的订购”中查看当前订阅的进度与详情",
-                     @"鲜啤酒灌装后, 不可回桶, 故“不支持7天无理由退换”, 望请理解"] line:true];
+                   _data.xstt_desList line:true];
     [_bgView addSubview:des];
     [des makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.and.trailing.equalTo(0);
@@ -101,7 +114,7 @@
     
     UILabel *tempView = nil;
     for (NSInteger i = 0; i < tips.count; i ++) {
-        UILabel *num = [UILabel convenienceWithFont:xstt_semiboldFont(12) text:[NSString stringWithFormat:@"%ld", i] textColor:xstt_FFFFFF_color(1.f)];
+        UILabel *num = [UILabel convenienceWithFont:xstt_semiboldFont(12) text:[NSString stringWithFormat:@"%ld", i + 1] textColor:xstt_FFFFFF_color(1.f)];
         num.backgroundColor = xstt_000000_color(0.87);
         num.textAlignment = NSTextAlignmentCenter;
         [num setLayerCornerRadius:8 clipToBounds:true];
@@ -145,6 +158,7 @@
 
 - (void)createGoodsVC {
     _goodsVC = XSTTBlindBoxDetailsGoodsTableViewController.new;
+    _goodsVC.xstt_dataArray = _data.xstt_beerList;
     [self addChildViewController:_goodsVC];
     [_bgView addSubview:_goodsVC.tableView];
     [_goodsVC.tableView makeConstraints:^(JXHConstraintMaker *make) {
@@ -164,14 +178,14 @@
         make.top.equalTo(self->_topView.bottom);
     }];
     
-    UILabel *title = [UILabel convenienceWithFont:xstt_mediumFont(23) text:@"入门精酿·盲盒订制盲盒订制" textColor:xstt_000000_color(0.87)];
+    UILabel *title = [UILabel convenienceWithFont:xstt_mediumFont(23) text:_data.xstt_boxName textColor:xstt_000000_color(0.87)];
     [_infoView addSubview:title];
     [title makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);
         make.top.equalTo(32);
     }];
     
-    UILabel *price = [UILabel convenienceWithFont:xstt_AlipayFont(23) text:@"159.00" textColor:xstt_FF5700_color()];
+    UILabel *price = [UILabel convenienceWithFont:xstt_AlipayFont(23) text:[NSString stringWithFormat:@"%.2lf", _data.xstt_price.floatValue] textColor:xstt_FF5700_color()];
     [price setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
     [_infoView addSubview:price];
     [price makeConstraints:^(JXHConstraintMaker *make) {
@@ -205,7 +219,7 @@
         make.top.equalTo(12);
     }];
     
-    UILabel *number = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:@"2023040159期" textColor:xstt_000000_color(0.87)];
+    UILabel *number = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:[NSString stringWithFormat:@"%@期", _data.xstt_boxNo] textColor:xstt_000000_color(0.87)];
     [contentView addSubview:number];
     [number makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(numberTtitle);
@@ -222,14 +236,14 @@
         make.top.equalTo(numberTtitle);
     }];
     
-    UILabel *time = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:@"2023/03/20" textColor:xstt_000000_color(0.87)];
+    UILabel *time = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:_data.xstt_cutOffTime textColor:xstt_000000_color(0.87)];
     [contentView addSubview:time];
     [time makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(timeTtitle);
         make.bottom.equalTo(number);
     }];
     
-    UILabel *desTitle = [UILabel convenienceWithFont:xstt_lightFont(23) text:@"极致低价·月月惊喜" textColor:xstt_000000_color(0.87)];
+    UILabel *desTitle = [UILabel convenienceWithFont:xstt_lightFont(23) text:_data.xstt_title textColor:xstt_000000_color(0.87)];
     [_infoView addSubview:desTitle];
     [desTitle makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);
@@ -237,7 +251,7 @@
     }];
     
     UILabel *des = [UILabel convenienceWithFont:xstt_font(15) textColor:xstt_000000_color(0.4) limitWidth:jxh_screenWidth() - XSTTMargin * 2];
-    [des setAttributedStringWithText:@"纯粹好原料, 每月享受啤酒真滋味, 不同酒厂、不同风格、口味丰富的精酿鲜啤, 酒厂直供快递到家" lineSpacing:4.5];
+    [des setAttributedStringWithText:_data.xstt_details lineSpacing:4.5];
     [_infoView addSubview:des];
     [des makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);
@@ -253,8 +267,8 @@
     }];
     
     UIButton *securityButton = [UIButton convenienceWithFont:xstt_font(15) target:self action:@selector(securityTips)];
-    [securityButton setTitle:@"·不支持7天无理由退货  ·不支持退" titleColor:xstt_000000_color(0.87) image:jxh_getImage(list_arrow) backgroundImage:nil state:JXHButtonControlStateNormal | JXHButtonControlStateHighlighted];
-    [securityButton setImageEdgeInsets:UIEdgeInsetsMake(0, 259, 0, -259)];
+    [securityButton setTitle:@"·不支持7天无理由退换" titleColor:xstt_000000_color(0.87) image:jxh_getImage(list_arrow) backgroundImage:nil state:JXHButtonControlStateNormal | JXHButtonControlStateHighlighted];
+    [securityButton setImageEdgeInsets:UIEdgeInsetsMake(0, 151, 0, -151)];
     [securityButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -46, 0, 46)];
     [_infoView addSubview:securityButton];
     [securityButton makeConstraints:^(JXHConstraintMaker *make) {
@@ -266,7 +280,7 @@
 
 - (void)createTopView {
     _topView = UIImageView.new;
-    _topView.image = _xstt_image;
+    [_topView sd_setImageWithURL:[NSURL URLWithString:_data.xstt_detailBg]];
     [_bgView addSubview:_topView];
     [_topView makeConstraints:^(JXHConstraintMaker *make) {
         make.top.and.leading.and.trailing.equalTo(0);
@@ -291,7 +305,7 @@
     CGSize size = (CGSize){jxh_screenWidth() - XSTTMargin * 2, 45};
     _buyButton = [UIButton convenienceWithTarget:self action:@selector(buyAction)];
     [_buyButton setStatusType:XSTTButtonStatusTypePrimary font:xstt_mediumFont(17) size:size];
-    [_buyButton setTitle:@"立即订购 ¥159.00" state:JXHButtonControlStateNormal];
+    [_buyButton setTitle:[NSString stringWithFormat:@"立即订购 ¥%.2lf", _data.xstt_price.floatValue] state:JXHButtonControlStateNormal];
     [self.view addSubview:_buyButton];
     [_buyButton makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);

+ 2 - 18
TOKTOK/TOKTOK/Home/BlindBox/Order/XSTTBlindBoxToOrderTableViewController.m

@@ -180,25 +180,9 @@ static NSString * const reuseIdentifier = @"XSTTBlindBoxToOrderTableViewCell";
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     [tableView deselectRowAtIndexPath:indexPath animated:false];
+    if (indexPath.row >= _dataArray.count) return;
     XSTTBlindBoxDetailsViewController *vc = XSTTBlindBoxDetailsViewController.new;
-    switch (indexPath.row) {
-        case 0:
-            vc.xstt_image = jxh_getImage(详情_入门);
-            break;
-        case 1:
-            vc.xstt_image = jxh_getImage(详情_高端);
-            break;
-        case 2:
-            vc.xstt_image = jxh_getImage(详情_酿造);
-            break;
-        case 3:
-            vc.xstt_image = jxh_getImage(详情_季节);
-            break;
-            
-        default:
-            break;
-            
-    }
+    vc.xstt_boxId = _dataArray[indexPath.row].xstt_boxId;
     [self.navigationController pushViewController:vc animated:true];
 }
 

+ 0 - 12
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_入门.imageset/Contents.json

@@ -1,12 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "入门.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_入门.imageset/入门.pdf


+ 0 - 12
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_季节.imageset/Contents.json

@@ -1,12 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "季节.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_季节.imageset/季节.pdf


+ 0 - 12
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_酿造.imageset/Contents.json

@@ -1,12 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "酿造.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_酿造.imageset/酿造.pdf


+ 0 - 12
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_高端.imageset/Contents.json

@@ -1,12 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "高端.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/列表_高端.imageset/高端.pdf


+ 0 - 21
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_入门.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "详情_入门.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_入门.imageset/详情_入门.png


+ 0 - 21
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_季节.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "详情_季节.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_季节.imageset/详情_季节.png


+ 0 - 21
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_酿造.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "详情_酿造.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_酿造.imageset/详情_酿造.png


+ 0 - 21
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_高端.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "详情_高端.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/BlindBox/详情_高端.imageset/详情_高端.png


+ 1 - 0
TOKTOK/TOKTOK/Public/Profile/XSTTURLApiProfile.h

@@ -73,6 +73,7 @@ CONST_STRING_INTERFACE XSTTURLGetStoreList;//门店列表
 
 #pragma mark - 盲盒相关
 CONST_STRING_INTERFACE XSTTURLGetBlindBoxList;//盲盒列表
+CONST_STRING_INTERFACE XSTTURLGetBlindBoxDetails;//盲盒详情
 
 #pragma mark - 气泡相关
 CONST_STRING_INTERFACE XSTTURLGetCircleContentList;//获取气泡列表

+ 1 - 0
TOKTOK/TOKTOK/Public/Profile/XSTTURLApiProfile.m

@@ -109,6 +109,7 @@ CONST_STRING XSTTURLGetStoreList = @"/stores/list";//门店列表
 
 #pragma mark - 盲盒相关
 CONST_STRING XSTTURLGetBlindBoxList = @"/box/list";//盲盒列表
+CONST_STRING XSTTURLGetBlindBoxDetails = @"/box/detail";//盲盒详情
 
 #pragma mark - 气泡相关
 CONST_STRING XSTTURLGetCircleContentList = @"/cont/content/list";//获取气泡列表