Commit 1f3e66a1 by 张卓

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 86bb3b82 5221a9f5
......@@ -288,15 +288,18 @@ export function themeMemberCardClick (item) {
cardData = innerItem;
}
});
let cardId = cardData.id;
let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")) : "";
if (cardData.receiveWay == 0) {
// 无门槛
let cardId = cardData.id;
let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")) : "";
shop.drawV3Card(cardId).then(res => {
if (res.data.code == 200) {
wx.showToast({
title: `开通【${cardData.title}】成功`,
icon: "none"
}).then(res => {
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`;
toPage("/personalCenter/membershipCard", backParams);
});
} else {
if (res.data.msg == "不能重复领卡") {
......@@ -326,7 +329,14 @@ export function themeMemberCardClick (item) {
console.error("无效的领取方式");
}
} else {
wx.showToast({title:res.data.msg,icon:"none"});
wx.showToast({title:res.data.msg,icon:"none"});
if (res.data.code == 300) {
console.log('----------334')
// 未登录
const url = `/pages/login/main?back=${encodeURIComponent('/')}`;
wx.navigateTo({ url: url });
}
}
});
};
\ No newline at end of file
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