Commit 6a650ddb by 程默

fix

parent f5b8d24e
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
spokesmanRelId: "3", //代言人的id spokesmanRelId: "3", //代言人的id
spokesmanBindId: "4", //代言人街道id spokesmanBindId: "4", //代言人街道id
hasInvitationStatus: 0, // 邀请资格:0-不能够邀请下级,1-能够邀请下级 hasInvitationStatus: 0, // 邀请资格:0-不能够邀请下级,1-能够邀请下级
newHref:"" newHref: ""
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -45,6 +45,14 @@ export default { ...@@ -45,6 +45,14 @@ export default {
//来自登录页面 //来自登录页面
this.page = decodeURIComponent(options.backpath); this.page = decodeURIComponent(options.backpath);
this.params += "&" + decodeURIComponent(options.params); this.params += "&" + decodeURIComponent(options.params);
} else if (options.from && options.from == "logout") {
this.page = "/";
wx.removeStorage({
key: "sessionid"
});
wx.removeStorage({
key: "openid"
});
} else if (options.from == "wxPay") { } else if (options.from == "wxPay") {
//来自支付页面 //来自支付页面
this.page = options.backpath; this.page = options.backpath;
...@@ -96,34 +104,33 @@ export default { ...@@ -96,34 +104,33 @@ export default {
async onShareAppMessage(res) { async onShareAppMessage(res) {
console.log(111111111111111); console.log(111111111111111);
await spokesman.getSpokesmanidByShare().then(res => { await spokesman.getSpokesmanidByShare().then(res => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.hasInvitationStatus == 1) { if (res.data.hasInvitationStatus == 1) {
this.hasInvitationStatus = 1; this.hasInvitationStatus = 1;
this.spokesmanGroupId = res.data.groupId; this.spokesmanGroupId = res.data.groupId;
this.spokesmanShopId = res.data.shopId; this.spokesmanShopId = res.data.shopId;
this.spokesmanRelId = res.data.spokesmanId; this.spokesmanRelId = res.data.spokesmanId;
if ( if (
res.data.spokesmanBindId || res.data.spokesmanBindId ||
(res.data.spokesmanBindId != null || (res.data.spokesmanBindId != null ||
res.data.belongToShopId != 0 || res.data.belongToShopId != 0 ||
res.data.belongToShopId != "") res.data.belongToShopId != "")
) { ) {
this.spokesmanBindId = res.data.belongToShopId; this.spokesmanBindId = res.data.belongToShopId;
} }
if (this.spokesmanBindId) { if (this.spokesmanBindId) {
this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}&spokesmanBindId=${spokesmanBindId}`; this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}&spokesmanBindId=${spokesmanBindId}`;
} else { } else {
this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`; this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
}
} }
this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
} }
}); this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
}
});
// await checkSpokesman(); // await checkSpokesman();
console.log(this.newHref,'////////'); console.log(this.newHref, "////////");
//获取webview当前页面地址 //获取webview当前页面地址
this.shareUrl = res.webViewUrl+this.newHref; this.shareUrl = res.webViewUrl + this.newHref;
console.log("share", res, this.shareUrl); console.log("share", res, this.shareUrl);
return { return {
title: this.shareUrl, // 默认是小程序的名称 title: this.shareUrl, // 默认是小程序的名称
......
<template> <template>
<div>{{message}}</div> <div class="domain">{{message}}</div>
</template> </template>
<script> <script>
...@@ -101,13 +101,7 @@ export default { ...@@ -101,13 +101,7 @@ export default {
</script> </script>
<style> <style>
.log-list { .domain{
display: flex; text-align: center;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
} }
</style> </style>
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