Commit 9c83b605 by 李嘉林

领取会员卡方法

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