Commit fd1aa5ac by 程默

分销

parent 21821c93
......@@ -44,7 +44,7 @@ export default {
} else if (options.from && options.from == "h5login") {
wx.setStorage({
key: "sessionid",
data: options.sessionid
data: JSON.parse(options.params).sessionid
});
} else if (options.from && options.from == "login") {
//来自登录页面
......@@ -69,11 +69,39 @@ export default {
var query = options.query.dentistId; // 参数二维码传递过来的场景参数
}
console.log("url", this.link + this.page + this.params);
},
components: {
// card
},
methods: {
async getSpokesman() {
await spokesman.getSpokesmanidByShare().then(res => {
if (res.data.code == 200) {
if (res.data.data.hasInvitationStatus == 1) {
this.hasInvitationStatus = 1;
this.spokesmanGroupId = res.data.data.groupId;
this.spokesmanShopId = res.data.data.shopId;
this.spokesmanRelId = res.data.data.spokesmanId;
if (
res.data.data.spokesmanBindId ||
(res.data.data.spokesmanBindId != null ||
res.data.data.belongToShopId != 0 ||
res.data.data.belongToShopId != "")
) {
this.spokesmanBindId = res.data.data.belongToShopId;
}
if (this.spokesmanBindId) {
this.newHref = `&spokesmanGroupId=${this.spokesmanGroupId}&spokesmanShopId=${this.spokesmanShopId}&spokesmanRelId=${this.spokesmanRelId}&spokesmanBindId=${this.spokesmanBindId}`;
} else {
this.newHref = `&spokesmanGroupId=${this.spokesmanGroupId}&spokesmanShopId=${this.spokesmanShopId}&spokesmanRelId=${this.spokesmanRelId}`;
}
}
console.log(this.newHref, "this.newHrefthis.newHrefthis.newHref");
}
});
},
bindViewTap() {
const url = "../logs/main";
if (mpvuePlatform === "wx") {
......@@ -107,32 +135,7 @@ export default {
// }
},
async onShareAppMessage(res) {
console.log(111111111111111);
await spokesman.getSpokesmanidByShare().then(res => {
if (res.code == 200) {
if (res.data.hasInvitationStatus == 1) {
this.hasInvitationStatus = 1;
this.spokesmanGroupId = res.data.groupId;
this.spokesmanShopId = res.data.shopId;
this.spokesmanRelId = res.data.spokesmanId;
if (
res.data.spokesmanBindId ||
(res.data.spokesmanBindId != null ||
res.data.belongToShopId != 0 ||
res.data.belongToShopId != "")
) {
this.spokesmanBindId = res.data.belongToShopId;
}
if (this.spokesmanBindId) {
this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}&spokesmanBindId=${spokesmanBindId}`;
} else {
this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
}
}
// this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
}
});
console.log(this.newHref, "////////");
await this.getSpokesman();
//获取webview当前页面地址
this.shareUrl = res.webViewUrl + this.newHref;
console.log("share", res, this.shareUrl);
......
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