if ([item.express_amount floatValue]==0) {
expressInfo = @"(包邮)";
}else{
expressInfo = [NSString stringWithFormat:@"(含运费 ¥%.2f)",[item.express_amount floatValue]];
}
NSString *infoStr = [NSString stringWithFormat:@"合计: ¥%.2f %@",[item.actual_amount floatValue],expressInfo];
NSMutableAttributedString *info = [[NSMutableAttributedString alloc]initWithString:infoStr];
[info addAttribute:NSForegroundColorAttributeName value:kLightTintColor range:NSMakeRange(0, 3)];
[info addAttribute:NSFontAttributeName value:FONT_14 range:NSMakeRange(0, 3)];
NSUInteger left = [[info string]rangeOfString:@"("].location;
NSUInteger right = [[info string]rangeOfString:@")"].location;
NSRange redRange = NSMakeRange(4, left-4+1);
[info addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:redRange];
[info addAttribute:NSFontAttributeName value:FONT_14 range:redRange];
NSRange lastRange = NSMakeRange(left,right-left+1);
[info addAttribute:NSForegroundColorAttributeName value:kLightTintColor range:lastRange];
[info addAttribute:NSFontAttributeName value:FONT_12 range:lastRange];
//订单信息
UILabel *goodsInfo = (UILabel *)[view viewWithTag:1100];
[goodsInfo setAttributedText:info];
合计: ¥1200.00(含运费 ¥20.00)