| | |
| | | @IBAction func exchangeAction(_ sender: UIButton) { |
| | | |
| | | |
| | | guard viewModel.detailModel.value?.residueNumber != 0 else { |
| | | CommonAlertView.show(isSinple: true, content: "兑换失败,当前剩余数量不足!") { |
| | | |
| | | } |
| | | return |
| | | } |
| | | |
| | | guard viewModel.detailModel.value?.good?.userCount != 0 else { |
| | | CommonAlertView.show(isSinple: true, content: "兑换失败,当前可换数量不足!") { |
| | | |
| | | } |
| | | return |
| | | } |
| | | // guard viewModel.detailModel.value?.residueNumber != 0 else { |
| | | // CommonAlertView.show(isSinple: true, content: "兑换失败,当前剩余数量不足!") { |
| | | // |
| | | // } |
| | | // return |
| | | // } |
| | | // |
| | | // guard viewModel.detailModel.value?.good?.userCount != 0 else { |
| | | // CommonAlertView.show(isSinple: true, content: "兑换失败,当前可换数量不足!") { |
| | | // |
| | | // } |
| | | // return |
| | | // } |
| | | |
| | | guard (viewModel.detailModel.value?.good?.integral ?? 0) < viewModel.surplusCoin.value else { |
| | | CommonAlertView.show(isSinple: true, content: "兑换失败,当前剩余积分不足!") { |