Skip to content

Commit de770ad

Browse files
committed
商城 - 优化显示
1 parent cdc3fa6 commit de770ad

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

Coding_iOS/Models/ShopOrder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
@property (strong, nonatomic) NSString *giftName;
2525
@property (strong, nonatomic) NSString *giftImage;
2626
@property (strong, nonatomic) NSString *remark;
27-
27+
@property (strong, nonatomic) NSString *optionName;
2828
@end

Coding_iOS/Views/Cell/ShopOderCell.m

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ @interface ShopOderCell()
1919
UILabel *_priceLabel;
2020
UILabel *_titleLabel;
2121
UILabel *_descLabel;
22-
UILabel *_countLabel;
22+
// UILabel *_countLabel;
2323
UIButton *_codingCoinView;
2424

2525
UILabel *_orderNumLabel;
@@ -119,12 +119,12 @@ - (void)setUpContentView
119119
_remarksLabel.textColor = [UIColor colorWithHexString:@"0x666666"];
120120
[_goodsInfoView addSubview:_remarksLabel];
121121

122-
_countLabel = [[UILabel alloc] initWithFrame:CGRectZero];
123-
_countLabel.font = FONT(12);
124-
_countLabel.backgroundColor = [UIColor clearColor];
125-
_countLabel.text = @"ⅹ1";
126-
_countLabel.textColor = [UIColor colorWithHexString:@"0x3BBD79"];
127-
[_goodsInfoView addSubview:_countLabel];
122+
// _countLabel = [[UILabel alloc] initWithFrame:CGRectZero];
123+
// _countLabel.font = FONT(12);
124+
// _countLabel.backgroundColor = [UIColor clearColor];
125+
// _countLabel.text = @"ⅹ1";
126+
// _countLabel.textColor = [UIColor colorWithHexString:@"0x3BBD79"];
127+
// [_goodsInfoView addSubview:_countLabel];
128128

129129
_codingCoinView = [UIButton buttonWithType:UIButtonTypeCustom];
130130
[_codingCoinView setImage:[UIImage imageNamed:@"shop_coding_coin_icon"] forState:UIControlStateNormal];
@@ -145,11 +145,11 @@ - (void)setUpContentView
145145
make.right.equalTo(superView.mas_right).offset(-(40));
146146
}];
147147

148-
[_countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
149-
make.centerY.equalTo(_titleLabel.mas_centerY);
150-
make.right.equalTo(_goodsInfoView.mas_right).offset(-7);
151-
make.width.offset(20);
152-
}];
148+
// [_countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
149+
// make.centerY.equalTo(_titleLabel.mas_centerY);
150+
// make.right.equalTo(_goodsInfoView.mas_right).offset(-7);
151+
// make.width.offset(20);
152+
// }];
153153

154154
[_codingCoinView mas_makeConstraints:^(MASConstraintMaker *make) {
155155
make.top.equalTo(_titleLabel.mas_bottom).offset(8);
@@ -366,7 +366,11 @@ - (void)configViewWithModel:(ShopOrder *)order
366366
[_codingCoinView setTitle:points_cost forState:UIControlStateNormal];
367367

368368
_orderNumLabel.text = order.orderNo;
369-
_remarksLabel.text = order.remark;
369+
NSString *remarkStr = order.remark ?: @"";
370+
if (order.optionName.length > 0) {
371+
remarkStr = [remarkStr stringByAppendingFormat:@"%@", order.optionName];
372+
}
373+
_remarksLabel.text = remarkStr.length > 0? remarkStr: @"";
370374
_nameLabel.text = order.receiverName;
371375
_addressLabel.text = order.receiverAddress;
372376
_phoneNumLabel.text = order.receiverPhone;

0 commit comments

Comments
 (0)