优化:兑换码使用时显示弹框提示,需要确认是否使用

This commit is contained in:
wuhui_zzw 2024-03-09 17:12:01 +08:00
parent a106aff01c
commit 87a4f5aefb
1 changed files with 28 additions and 14 deletions

View File

@ -806,21 +806,35 @@
success(res) { success(res) {
let result = res.result || ''; let result = res.result || '';
if(result){ if(result){
vipExchangeCode({ uni.showModal({
exchange_code: result title: '确认使用!',
}).then(res => { content: '使用后当前兑换码将立即生效!是否确认使用?',
if(res.status == 200){ showCancel: true, //
uni.showModal({ cancelText: '取消', //
title: '开通成功', confirmText: '立即使用', //
success: (res) => { success: (res) => {
uni.navigateTo({ if (res.confirm) {
url: '/pages/annex/vip_center/index' vipExchangeCode({
}); exchange_code: result
} }).then(res => {
}); if(res.status == 200){
uni.showModal({
title: '开通成功',
success: (res) => {
uni.navigateTo({
url: '/pages/annex/vip_center/index'
});
}
});
}
}).catch(err => {
_this.$util.Tips({title: err});
});
}
if (res.cancel) {
console.log("取消")
}
} }
}).catch(err => {
_this.$util.Tips({title: err});
}); });
} }
}, },