Commit 9b447d4c28edce7cf0a6c0d01def64f5d96f45ac
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/CNLiveCMineModule
* 'master' of bj.gitlab.cnlive.com:ios-team/CNLiveCMineModule: 积分详情加缩进
Showing
1 changed file
with
17 additions
and
2 deletions
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteDetailHeaderView.m
| @@ -37,12 +37,27 @@ | @@ -37,12 +37,27 @@ | ||
| 37 | self.inteLabel.attributedText = coin_string; | 37 | self.inteLabel.attributedText = coin_string; |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | - NSMutableAttributedString * spend_string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"获取:%@",[detailModel.obtainIntegral isNotBlank]?detailModel.obtainIntegral:@"0"]]; | 40 | + NSString * obtainString = [detailModel.obtainIntegral isNotBlank]?detailModel.obtainIntegral:@"0"; |
| 41 | + NSString * o = [NSString stringWithFormat:@"获取:%@",obtainString]; | ||
| 42 | + NSInteger obtain = [obtainString integerValue]; | ||
| 43 | + if (obtain >= 10000) { | ||
| 44 | + o = [NSString stringWithFormat:@"获取:%.2fW",(float)obtain/10000]; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + NSString * payString = [detailModel.payIntegral isNotBlank]?detailModel.payIntegral:@"0"; | ||
| 48 | + NSString * p = [NSString stringWithFormat:@"支出:%@",payString]; | ||
| 49 | + NSInteger pay = [payString integerValue]; | ||
| 50 | + if (pay >= 10000) { | ||
| 51 | + p = [NSString stringWithFormat:@"支出:%.2fW",(float)pay/10000]; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + NSMutableAttributedString * spend_string = [[NSMutableAttributedString alloc] initWithString:o]; | ||
| 41 | [spend_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:[spend_string.string rangeOfString:@"获取:"]]; | 56 | [spend_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:[spend_string.string rangeOfString:@"获取:"]]; |
| 42 | [spend_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0, [spend_string.string rangeOfString:@"获取:"].location)]; | 57 | [spend_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0, [spend_string.string rangeOfString:@"获取:"].location)]; |
| 43 | self.spendLabel.attributedText = spend_string; | 58 | self.spendLabel.attributedText = spend_string; |
| 44 | 59 | ||
| 45 | - NSMutableAttributedString * obta_string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"支出:%@",[detailModel.payIntegral isNotBlank]?detailModel.payIntegral:@"0"]]; | 60 | + NSMutableAttributedString * obta_string = [[NSMutableAttributedString alloc] initWithString:p]; |
| 46 | [obta_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:[obta_string.string rangeOfString:@"支出:"]]; | 61 | [obta_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:[obta_string.string rangeOfString:@"支出:"]]; |
| 47 | [obta_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0, [obta_string.string rangeOfString:@"支出:"].location)]; | 62 | [obta_string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0, [obta_string.string rangeOfString:@"支出:"].location)]; |
| 48 | self.obtaLabel.attributedText = obta_string; | 63 | self.obtaLabel.attributedText = obta_string; |