|
@@ -82,14 +82,13 @@
|
|
|
[XSTTRouteManager navigationBackAndRouteTo:[[XSTTRouter alloc] initWithClass:nil property:@{} tabBarType:XSTTTabBarTypeBeerCentre]];
|
|
|
break;
|
|
|
case 1:
|
|
|
- [self.navigationController pushViewController:XSTTStoreListViewController.new animated:true];
|
|
|
+ [self.navigationController pushViewController:XSTTBreweryListViewController.new animated:true];
|
|
|
break;
|
|
|
case 2:
|
|
|
- [self.navigationController pushViewController:XSTTBlindBoxToOrderTableViewController.new animated:true];
|
|
|
+ [self.navigationController pushViewController:XSTTStoreListViewController.new animated:true];
|
|
|
break;
|
|
|
- case 3: {
|
|
|
- [self.navigationController pushViewController:XSTTBreweryListViewController.new animated:true];
|
|
|
- }
|
|
|
+ case 3:
|
|
|
+ [self.navigationController pushViewController:XSTTBlindBoxToOrderTableViewController.new animated:true];
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -161,67 +160,58 @@
|
|
|
}
|
|
|
|
|
|
- (void)createFeatureView {
|
|
|
+ CGFloat height = (jxh_screenWidth() - XSTTMargin * 2) * 0.2;
|
|
|
+
|
|
|
UIView *featureView = UIView.new;
|
|
|
[_bgView addSubview:featureView];
|
|
|
[featureView makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
make.top.equalTo(self->_headerView.bottom);
|
|
|
make.leading.and.trailing.equalTo(0);
|
|
|
- make.height.equalTo(344);
|
|
|
+ make.height.equalTo(height * 4 + 8 * 3 + 16 * 2);
|
|
|
make.bottom.equalTo(0);
|
|
|
}];
|
|
|
|
|
|
- NSArray *titles = @[@"精酿鲜啤", @"到店品鉴", @"盲盒订购", @"酿酒厂", @"酒厂直供,最新鲜的鲜啤原浆", @"数百款啤酒,类型丰富、免费试喝", @"亲自酿造一桶酒, 鲜啤定制很OK", @"纯粹好原料,才有鲜活好口感"];
|
|
|
- CGFloat width = (jxh_screenWidth() - XSTTMargin * 3) / 2;
|
|
|
- UIView *tempView = nil;
|
|
|
+ NSArray *titles = @[@"精酿鲜啤", @"酿酒厂", @"到店品鉴", @"盲盒订购", @"酒厂直供,最新鲜的鲜啤原浆", @"纯粹好原料,才有鲜活好口感", @"数百款啤酒,类型丰富、免费试喝", @"亲自酿造一桶酒, 鲜啤定制很OK"];
|
|
|
+
|
|
|
+ UIButton *tempView = nil;
|
|
|
for (NSInteger i = 0; i < 4; i ++) {
|
|
|
- UIView *view = UIView.new;
|
|
|
- [featureView addSubview:view];
|
|
|
- [view makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
- if (i % 2 == 0) {
|
|
|
- make.leading.equalTo(XSTTMargin);
|
|
|
- if (tempView) {
|
|
|
- make.top.equalTo(tempView.bottom).offset(XSTTMargin);
|
|
|
- } else {
|
|
|
- make.top.equalTo(21);
|
|
|
- }
|
|
|
+ UIButton *button = [UIButton convenienceWithTarget:self action:@selector(featureAction:)];
|
|
|
+ [button setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"home%@", titles[i]]] state:JXHButtonControlStateNormal | JXHButtonControlStateHighlighted];
|
|
|
+ [featureView addSubview:button];
|
|
|
+ [button makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
+ make.leading.equalTo(XSTTMargin);
|
|
|
+ if (tempView) {
|
|
|
+ make.top.equalTo(tempView.bottom).offset(8);
|
|
|
} else {
|
|
|
- make.top.equalTo(tempView);
|
|
|
- make.trailing.equalTo(-XSTTMargin);
|
|
|
+ make.top.equalTo(16);
|
|
|
}
|
|
|
- make.size.equalTo((CGSize){width, 141});
|
|
|
+ make.size.equalTo((CGSize){jxh_screenWidth() - XSTTMargin * 2, height});
|
|
|
}];
|
|
|
|
|
|
- tempView = view;
|
|
|
- [view.layer setShadowWithOffset:(CGSize){0, 6} alpha:0.1 blur:32 spread:0 color:xstt_A7DDD9_color() cornerRadius:8 pathRect:(CGRect){0, 0, width, 141}];
|
|
|
+ tempView = button;
|
|
|
+// [view.layer setShadowWithOffset:(CGSize){0, 6} alpha:0.1 blur:32 spread:0 color:xstt_A7DDD9_color() cornerRadius:8 pathRect:(CGRect){0, 0, width, 141}];
|
|
|
|
|
|
- UIButton *button = [UIButton convenienceWithTarget:self action:@selector(featureAction:)];
|
|
|
button.tag = xstt_homeFeatureButtonTag + i;
|
|
|
- [view addSubview:button];
|
|
|
- [button makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
- make.edges.equalTo(view);
|
|
|
- }];
|
|
|
- button.backgroundColor = xstt_FFFFFF_color(1.f);
|
|
|
- [button.layer setShadowWithOffset:(CGSize){0, 4} alpha:0.1 blur:8 spread:0 color:xstt_A7DDD9_color() cornerRadius:8 pathRect:(CGRect){0, 0, width, 141}];
|
|
|
+// [button.layer setShadowWithOffset:(CGSize){0, 4} alpha:0.1 blur:8 spread:0 color:xstt_A7DDD9_color() cornerRadius:8 pathRect:(CGRect){0, 0, width, 141}];
|
|
|
|
|
|
- UILabel *title = [UILabel convenienceWithFont:xstt_mediumFont(17) text:titles[i] textColor:xstt_000000_color(0.87) textAlignment:NSTextAlignmentLeft];
|
|
|
+ UILabel *title = [UILabel convenienceWithFont:xstt_semiboldFont(17) text:titles[i] textColor:xstt_FFFFFF_color(1.f) textAlignment:NSTextAlignmentLeft];
|
|
|
[button addSubview:title];
|
|
|
[title makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
make.leading.equalTo(XSTTMargin);
|
|
|
- make.top.equalTo(65);
|
|
|
+ make.top.equalTo(14);
|
|
|
}];
|
|
|
|
|
|
- UILabel *content = [UILabel convenienceWithFont:xstt_font(13) textColor:xstt_000000_color(0.6) limitWidth:width - XSTTMargin * 2];
|
|
|
- [content setAttributedStringWithText:titles[i + 4] lineSpacing:2];
|
|
|
+ UILabel *content = [UILabel convenienceWithFont:xstt_semiboldFont(12) text:titles[i + 4] textColor:xstt_FFFFFF_color(0.8) textAlignment:NSTextAlignmentLeft];
|
|
|
[button addSubview:content];
|
|
|
[content makeConstraints:^(JXHConstraintMaker *make) {
|
|
|
make.leading.equalTo(XSTTMargin);
|
|
|
- make.top.equalTo(title.bottom).offset(4);
|
|
|
+ make.bottom.equalTo(-13);
|
|
|
}];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- (void)createBgView {
|
|
|
- _bgView = [UIScrollView convenienceWithBackgroundColor:xstt_FFFFFF_color(1.0)];
|
|
|
+ _bgView = [UIScrollView convenienceWithBackgroundColor:xstt_F7F7F7_color()];
|
|
|
_bgView.delegate = self;
|
|
|
[self.view addSubview:_bgView];
|
|
|
[_bgView makeConstraints:^(JXHConstraintMaker *make) {
|