Commit 2d540d75af89078bfd26b5b2244f7caaaa06d846

Authored by yanglingyu
2 parents 83438955 6217384a

Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/CNLiveCMineModule

* 'master' of bj.gitlab.cnlive.com:ios-team/CNLiveCMineModule:
  首页添加W缩写
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteHeaderView.m
... ... @@ -87,7 +87,15 @@
87 87 _announModel = announModel;
88 88 _activModel = activModel;
89 89 [self.signView setupWithScoreModel:scoreModel taskModel:taskModel announModel:announModel activModel:activModel];
90   - NSMutableAttributedString * coin_string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@积分",[taskModel.integral isNotBlank]?taskModel.integral:@"0"]];
  90 +
  91 + NSString * payString = [taskModel.integral isNotBlank]?taskModel.integral:@"0";
  92 + NSString * p = [NSString stringWithFormat:@"%@积分",payString];
  93 + NSInteger pay = [payString integerValue];
  94 + if (pay >= 10000) {
  95 + p = [NSString stringWithFormat:@"%.2fW积分",(float)pay/10000];
  96 + }
  97 +
  98 + NSMutableAttributedString * coin_string = [[NSMutableAttributedString alloc] initWithString:p];
91 99 [coin_string addAttribute:NSFontAttributeName value:UIFontCNMake(12) range:[coin_string.string rangeOfString:@"积分"]];
92 100 [coin_string addAttribute:NSFontAttributeName value:UIFontBoldCNMake(30) range:NSMakeRange(0, [coin_string.string rangeOfString:@"积分"].location)];
93 101 self.inteLabel.attributedText = coin_string;
... ...