优化:兑换码使用时显示弹框提示,需要确认是否使用
This commit is contained in:
parent
a106aff01c
commit
87a4f5aefb
|
|
@ -806,6 +806,14 @@
|
|||
success(res) {
|
||||
let result = res.result || '';
|
||||
if(result){
|
||||
uni.showModal({
|
||||
title: '确认使用!',
|
||||
content: '使用后当前兑换码将立即生效!是否确认使用?',
|
||||
showCancel: true, // 是否显示取消按钮
|
||||
cancelText: '取消', // 取消按钮文字
|
||||
confirmText: '立即使用', // 确认按钮文字
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
vipExchangeCode({
|
||||
exchange_code: result
|
||||
}).then(res => {
|
||||
|
|
@ -823,6 +831,12 @@
|
|||
_this.$util.Tips({title: err});
|
||||
});
|
||||
}
|
||||
if (res.cancel) {
|
||||
console.log("取消")
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res);
|
||||
|
|
|
|||
Loading…
Reference in New Issue