|
|
@@ -583,10 +583,12 @@ export default {
|
|
|
uni.showToast({ title: 'CF值不足,当前可用 ' + this.cfBalance + ' CF值', icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
+ coupon.exchanging = true
|
|
|
uni.showLoading({ title: '兑换中...' })
|
|
|
try {
|
|
|
var res = await exchangeCouponByCf({ couponId: coupon.id })
|
|
|
uni.hideLoading()
|
|
|
+ coupon.exchanging = false
|
|
|
if (res.code === 200) {
|
|
|
uni.showToast({ title: '兑换成功', icon: 'success' })
|
|
|
// 从可兑换列表移除,加入已拥有列表
|
|
|
@@ -604,6 +606,7 @@ export default {
|
|
|
}
|
|
|
} catch (e) {
|
|
|
uni.hideLoading()
|
|
|
+ coupon.exchanging = false
|
|
|
uni.showToast({ title: '兑换失败', icon: 'none' })
|
|
|
}
|
|
|
},
|