1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // FKRecommendItem.m
- // FirstLink
- //
- // Created by jack on 15/12/8.
- // Copyright © 2015年 FirstLink. All rights reserved.
- //
- #import "FKHotProductItem.h"
- @implementation FKHotProductItem
- + (NSDictionary*)mts_mapping {
- return @{@"product_id": mts_key(itemID),
- @"id": mts_key(recoItemID),
- @"user_id": mts_key(userID),
- @"first_pic": mts_key(picUrl),
- @"mark_pic": mts_key(markPicUrl),
- @"title": mts_key(title),
- @"brand_name": mts_key(brandName),
- @"price": mts_key(price),
- @"original_price": mts_key(oringalPrice),
- @"supplier_pic": mts_key(supplierPicUrl),
- @"sales_count": mts_key(salesCount),
- @"status": mts_key(status),
- };
- }
- + (BOOL)mts_shouldSetUndefinedKeys {
- return NO;
- }
- - (NSAttributedString *)priceAttributedString {
- NSString *price = self.price ? [NSString stringWithFormat:@"¥%d ", [[FLStringHelper convertFenToYuan:self.price] intValue]] : nil;
- NSString *originalPrice = self.oringalPrice ? [NSString stringWithFormat:@"¥%d", [[FLStringHelper convertFenToYuan:self.oringalPrice] intValue]] : nil;
-
-
- NSAttributedString *attributeString = [FLStringHelper attStringWithText:price
- color:UIColorFromRGB(0xff624a)
- font:[UIFont systemFontOfSize:14]
- subText:originalPrice
- subColor:UIColorFromRGB(0x999999)
- subFont:[UIFont systemFontOfSize:10]];
-
- return attributeString;
- }
- @end
|