Commit 9c83b605 by 李嘉林

领取会员卡方法

parent 908e3b2b
...@@ -275,7 +275,7 @@ function useCoupon(val, couponCode, usingIntegrals) { ...@@ -275,7 +275,7 @@ function useCoupon(val, couponCode, usingIntegrals) {
} }
}); });
}; };
export function themeMemberCardClick (item) { export function themeMemberCardClick(item) {
let query = { let query = {
portalCardId: item.id portalCardId: item.id
}; };
...@@ -295,12 +295,14 @@ export function themeMemberCardClick (item) { ...@@ -295,12 +295,14 @@ export function themeMemberCardClick (item) {
shop.drawV3Card(cardId).then(res => { shop.drawV3Card(cardId).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
wx.showToast({ wx.showToast({
title: `开通【${cardData.title}】成功`, content: `开通【${cardData.title}】成功`,
icon: "none" showCancel: false,
}).then(res => { confirmColor: '',
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`; success: res => {
toPage("/personalCenter/membershipCard", backParams); let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`;
}); toPage("/personalCenter/membershipCard", backParams);
}
})
} else { } else {
if (res.data.msg == "不能重复领卡") { if (res.data.msg == "不能重复领卡") {
console.log("---------------------------to-----1") console.log("---------------------------to-----1")
...@@ -333,9 +335,10 @@ export function themeMemberCardClick (item) { ...@@ -333,9 +335,10 @@ export function themeMemberCardClick (item) {
if (res.data.code == 300) { if (res.data.code == 300) {
console.log('----------334') console.log('----------334')
// 未登录 // 未登录
const url = `/pages/login/main?back=${encodeURIComponent('/')}`; setTimeout(() => {
let url = `/pages/login/main?back=${encodeURIComponent('/')}`;
wx.navigateTo({ url: url }); wx.navigateTo({ url: url });
}, 200);
} }
} }
}); });
......
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