Commit d9d38e278fe8f8dbc586d7a177b2278ac4fa2a5c
1 parent
c30c0332
0.1.3 版本 修改生成二维码金额计算不对
Showing
2 changed files
with
6 additions
and
6 deletions
CNLiveCommuntyModule.podspec
CNLiveCommuntyModule/Classes/View/CNLiveCommuntSignUpView.m
| ... | ... | @@ -671,9 +671,9 @@ |
| 671 | 671 | __weak typeof(self) weakSelf = self; |
| 672 | 672 | if ([self.createModel.totalFee isNotBlank] |
| 673 | 673 | && [self.createModel.totalFee integerValue] > 0) { |
| 674 | - NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)]; | |
| 674 | + NSString * p = [NSString stringWithFormat:@"%.0f",[weakSelf.amoutField.text doubleValue]*100]; | |
| 675 | 675 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:self.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { |
| 676 | - NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; | |
| 676 | + NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text doubleValue]]; | |
| 677 | 677 | weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{ |
| 678 | 678 | NSLog(@"移除监听通知"); |
| 679 | 679 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| ... | ... | @@ -683,11 +683,11 @@ |
| 683 | 683 | }]; |
| 684 | 684 | }else{ |
| 685 | 685 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ |
| 686 | - NSString * p = [NSString stringWithFormat:@"%ld",([weakSelf.amoutField.text integerValue]*100)]; | |
| 686 | + NSString * p = [NSString stringWithFormat:@"%.0f",[weakSelf.amoutField.text doubleValue]*100]; | |
| 687 | 687 | weakSelf.amoutField.enabled = NO; |
| 688 | 688 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); |
| 689 | 689 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { |
| 690 | - NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text floatValue]]; | |
| 690 | + NSString * p = [NSString stringWithFormat:@"%.2f",[self.amoutField.text doubleValue]]; | |
| 691 | 691 | weakSelf.modalView = [CNLiveCommuntSignUpView showQrTipSuccessViewWithPrice:p PayUrl:payUrl CompleterBlock:^{ |
| 692 | 692 | NSLog(@"移除监听通知"); |
| 693 | 693 | [[NSNotificationCenter defaultCenter] removeObserver:weakSelf name:@"kIMAMSG_ScanPaySuccessNotification" object:nil]; |
| ... | ... | @@ -723,7 +723,7 @@ |
| 723 | 723 | } |
| 724 | 724 | __weak typeof(self) weakSelf = self; |
| 725 | 725 | [CNLiveCommuntSignUpView showAlertViewWithMessage:@"请仔细核对金额,确认后将不可修改" CompleterBlock:^{ |
| 726 | - NSString * p = [NSString stringWithFormat:@"%ld",([self.amoutField.text integerValue]*100)]; | |
| 726 | + NSString * p = [NSString stringWithFormat:@"%.0f",[weakSelf.amoutField.text doubleValue]*100]; | |
| 727 | 727 | weakSelf.amoutField.enabled = NO; |
| 728 | 728 | weakSelf.amoutField.textColor = UIColorHex(#c8c8c8); |
| 729 | 729 | [CNLiveCommuntViewModel requestWithCommuntyTotalFeeOrderMentOrderId:weakSelf.createModel.idStr totalFee:p CompleterBlock:^(NSString * _Nonnull payUrl) { | ... | ... |