|
@@ -1031,7 +1031,6 @@ self.isrefreshing=false;
|
|
|
cell.hmlg_stock_count_lb.hidden = YES;
|
|
cell.hmlg_stock_count_lb.hidden = YES;
|
|
|
cell.on_sale_lb.hidden = YES;
|
|
cell.on_sale_lb.hidden = YES;
|
|
|
BOOL is_special_model = [[section_json objectForKey:@"is_special_model"] boolValue];
|
|
BOOL is_special_model = [[section_json objectForKey:@"is_special_model"] boolValue];
|
|
|
- BOOL is_promotion_price = [[section_json objectForKey:@"is_promotion_price"] boolValue];
|
|
|
|
|
if (!appDelegate.user) { // 没有登录时隐藏add to portfolio,使add to cart与add to wishlist对齐
|
|
if (!appDelegate.user) { // 没有登录时隐藏add to portfolio,使add to cart与add to wishlist对齐
|
|
|
|
|
|
|
|
cell.btnaddPortfolio.hidden = YES;
|
|
cell.btnaddPortfolio.hidden = YES;
|
|
@@ -1578,10 +1577,17 @@ self.isrefreshing=false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#ifdef BUILD_HOMER
|
|
#ifdef BUILD_HOMER
|
|
|
- if (appDelegate.user && is_special_model && !is_promotion_price) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ NSString *old_price = [section_json objectForKey:@"old_price"];
|
|
|
|
|
+ if (appDelegate.user && old_price != nil && old_price.length > 0) {
|
|
|
cell.priceLabel.text = nil;
|
|
cell.priceLabel.text = nil;
|
|
|
- NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:price attributes:@{NSStrikethroughStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle]}];
|
|
|
|
|
|
|
+ NSString *new_price_str = [NSString stringWithFormat:@"%@ %@",price,old_price];
|
|
|
|
|
+ NSRange range = [new_price_str rangeOfString:@"$" options:NSBackwardsSearch];
|
|
|
|
|
+ range = NSMakeRange(range.location,new_price_str.length - range.location);
|
|
|
|
|
+ NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:new_price_str];
|
|
|
|
|
+ [attrStr addAttributes:@{
|
|
|
|
|
+ NSStrikethroughStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle]
|
|
|
|
|
+ }
|
|
|
|
|
+ range:range];
|
|
|
cell.priceLabel.attributedText = attrStr;
|
|
cell.priceLabel.attributedText = attrStr;
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|