优化:兑换码使用时显示弹框提示,需要确认是否使用
This commit is contained in:
parent
a106aff01c
commit
87a4f5aefb
|
|
@ -806,21 +806,35 @@
|
|||
success(res) {
|
||||
let result = res.result || '';
|
||||
if(result){
|
||||
vipExchangeCode({
|
||||
exchange_code: result
|
||||
}).then(res => {
|
||||
if(res.status == 200){
|
||||
uni.showModal({
|
||||
title: '开通成功',
|
||||
success: (res) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/annex/vip_center/index'
|
||||
});
|
||||
}
|
||||
});
|
||||
uni.showModal({
|
||||
title: '确认使用!',
|
||||
content: '使用后当前兑换码将立即生效!是否确认使用?',
|
||||
showCancel: true, // 是否显示取消按钮
|
||||
cancelText: '取消', // 取消按钮文字
|
||||
confirmText: '立即使用', // 确认按钮文字
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
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});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue