Commit 42e37720 by 李嘉林

webview 添加sessionid

parent 9c83b605
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
link: this.baseUrl, link: this.baseUrl,
page: "/", page: "/",
location_obj:encodeURIComponent(wx.getStorageSync("location")), location_obj:encodeURIComponent(wx.getStorageSync("location")),
params: "?mixid=" + this.shopId+`&native_test=1&location_obj=${this.location_obj}`, params: "?mixid=" + this.shopId+`&native_test=1`,
userInfo: { userInfo: {
nickName: "mpvue", nickName: "mpvue",
...@@ -53,8 +53,15 @@ export default { ...@@ -53,8 +53,15 @@ export default {
}, },
computed: { computed: {
pageUrl() { pageUrl() {
return this.link+this.page+this.params; if(this.location_obj){
this.params += `&location_obj=${this.location_obj}`;
}
if(wx.getStorageSync("sessionid")){
this.params +=`&sessionid=${wx.getStorageSync("sessionid")}`;
} }
console.log(this.params,'-------------------------57')
return this.link+this.page+this.params;
},
}, },
watch: { watch: {
pageUrl(n,o) { pageUrl(n,o) {
......
...@@ -299,14 +299,20 @@ export function themeMemberCardClick(item) { ...@@ -299,14 +299,20 @@ export function themeMemberCardClick(item) {
showCancel: false, showCancel: false,
confirmColor: '', confirmColor: '',
success: res => { success: res => {
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`; let backParams = `&cardId=${cardData.id}`;
if (userInfo.mobilephone) {
backParams += `&userTel=${userInfo.mobilephone}`;
}
toPage("/personalCenter/membershipCard", backParams); toPage("/personalCenter/membershipCard", backParams);
} }
}) })
} else { } else {
if (res.data.msg == "不能重复领卡") { if (res.data.msg == "不能重复领卡") {
console.log("---------------------------to-----1") console.log("---------------------------to-----1")
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`; let backParams = `&cardId=${cardData.id}`;
if (userInfo.mobilephone) {
backParams += `&userTel=${userInfo.mobilephone}`;
}
toPage("/personalCenter/membershipCard",backParams); toPage("/personalCenter/membershipCard",backParams);
} else { } else {
wx.showToast({ title: res.data.msg, icon: "none" }); wx.showToast({ title: res.data.msg, icon: "none" });
...@@ -324,7 +330,10 @@ export function themeMemberCardClick(item) { ...@@ -324,7 +330,10 @@ export function themeMemberCardClick(item) {
toPage("/pay/payCard", backParams); toPage("/pay/payCard", backParams);
} else { } else {
console.log("---------------------------to-----3") console.log("---------------------------to-----3")
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`; let backParams = `&cardId=${cardData.id}`;
if (userInfo.mobilephone) {
backParams += `&userTel=${userInfo.mobilephone}`;
}
toPage("/personalCenter/membershipCard", backParams); toPage("/personalCenter/membershipCard", backParams);
} }
} else { } else {
......
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