Commit e3e6296f by 高淑倩

modify: 开卡弹框

parent 2b908196
......@@ -416,34 +416,55 @@ class WXService extends Http {
return false
}
this.showOpenCardModelLock = true // 避免多次弹出开卡对话窗
wx.showModal({
title: '请激活会员卡',
content: '为了您更好的购物体验,请您先完善会员信息',
showCancel: true,
success: res => {
if (res.confirm) {
wx.navigateToMiniProgram({
appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
success: function (data) {
console.log('navigateToMiniProgram success data is %o', data)
_self.lock = false
},
fail: function (data) {
console.log('navigateToMiniProgram fail data is %o', data)
_self.lock = false
reject(data)
}
})
} else {
this.router('/pages/welcome/welcome')
console.log('取消开卡跳转')
}
// 开卡
wx.navigateToMiniProgram({
appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
success: function (data) {
console.log('navigateToMiniProgram success data is %o', data)
_self.lock = false
},
complete: () => {
fail: function (data) {
console.log('navigateToMiniProgram fail data is %o', data)
this.router('/pages/userCenter/userCenter')
// this.router('/pages/welcome/welcome')
_self.lock = false
reject(data)
},
complete() {
this.showOpenCardModelLock = false
}
})
// wx.showModal({
// title: '请激活会员卡',
// content: '为了您更好的购物体验,请您先完善会员信息',
// showCancel: true,
// success: res => {
// if (res.confirm) {
// wx.navigateToMiniProgram({
// appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
// extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
// success: function (data) {
// console.log('navigateToMiniProgram success data is %o', data)
// _self.lock = false
// },
// fail: function (data) {
// console.log('navigateToMiniProgram fail data is %o', data)
// _self.lock = false
// reject(data)
// }
// })
// } else {
// this.router('/pages/welcome/welcome')
// console.log('取消开卡跳转')
// }
// },
// complete: () => {
// this.showOpenCardModelLock = false
// }
// })
}
openCard() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment