Commit e4f18d1e by 程默

扫码进入分销员中心

parent 25c1e8a3
...@@ -34,8 +34,13 @@ export default { ...@@ -34,8 +34,13 @@ export default {
shareShopName: "", shareShopName: "",
shareLogoUrl: "", shareLogoUrl: "",
shareOrderSn: "", shareOrderSn: "",
shareTid:"", shareTid: "",
sharePageList: ["goods/", "receivingGift","article/"] sharePageList: [
"goods/",
"receivingGift",
"article/",
"/personalCenter/spokesmanCenter/mine/popularize"
] //分享白名单
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -79,7 +84,7 @@ export default { ...@@ -79,7 +84,7 @@ export default {
} else if (options.from && options.from == "login") { } else if (options.from && options.from == "login") {
//来自小程序登录页面 //来自小程序登录页面
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") { } else if (options.from && options.from == "logout") {
//来自用户登出 //来自用户登出
wx.removeStorage({ wx.removeStorage({
...@@ -91,7 +96,7 @@ export default { ...@@ -91,7 +96,7 @@ export default {
} else if (options.from && options.from == "address") { } else if (options.from && options.from == "address") {
// 来自小程序地址页面 // 来自小程序地址页面
this.link = decodeURIComponent(options.backpath); this.link = decodeURIComponent(options.backpath);
console.log('adress',options.backpath,this.link) console.log("adress", options.backpath, this.link);
this.page = ""; this.page = "";
this.params = ""; this.params = "";
} else if (options.from == "wxPay") { } else if (options.from == "wxPay") {
...@@ -107,11 +112,18 @@ export default { ...@@ -107,11 +112,18 @@ export default {
if (querys[0] == "pid") { if (querys[0] == "pid") {
//商品详情 pid_123 //商品详情 pid_123
this.page = `/goods/${querys[1]}`; this.page = `/goods/${querys[1]}`;
} else if (querys[0] == "activty") {//活动页面activty_turntable_123 } else if (querys[0] == "activty") {
this.params+=`&pageInfo=${scene}` //活动页面activty_turntable_123
this.params += `&pageInfo=${scene}`;
} else if (querys[0] == "spokesman") {
//分销员 小程序码
this.page = `/personalCenter/spokesmanCenter`;
this.params += `&spokesmanGroupId=${querys[0]}&spokesmanShopId=${
querys[1]
}&spokesmanRelId=${querys[2]}`;
} }
} }
console.log(querys,'scene'); console.log(querys, "scene");
// var query = options.query.dentistId; // 参数二维码传递过来的场景参数 // var query = options.query.dentistId; // 参数二维码传递过来的场景参数
} }
console.log("url", this.link + this.page + this.params); console.log("url", this.link + this.page + this.params);
...@@ -178,6 +190,8 @@ export default { ...@@ -178,6 +190,8 @@ export default {
}&spokesmanShopId=${this.spokesmanShopId}&spokesmanRelId=${ }&spokesmanShopId=${this.spokesmanShopId}&spokesmanRelId=${
this.spokesmanRelId this.spokesmanRelId
}`; }`;
}else{
this.newHref="";
} }
console.log(this.newHref, "this.newHrefthis.newHrefthis.newHref"); console.log(this.newHref, "this.newHrefthis.newHrefthis.newHref");
} }
...@@ -198,8 +212,8 @@ export default { ...@@ -198,8 +212,8 @@ export default {
this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400); this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400);
//分享内容中有订单信息为送礼活动 //分享内容中有订单信息为送礼活动
this.shareOrderSn = res.target.data[len].orderSn; this.shareOrderSn = res.target.data[len].orderSn;
this.shareTid=res.target.data[len].shareTid; this.shareTid = res.target.data[len].shareTid;
console.log("分享信息:", this.shareLogoUrl, this.shareShopName); console.log("分享信息:", this.shareLogoUrl, this.shareShopName);
}, },
checkPageUrl(val) { checkPageUrl(val) {
...@@ -231,16 +245,25 @@ export default { ...@@ -231,16 +245,25 @@ export default {
if (!this.checkPageUrl(url)) { if (!this.checkPageUrl(url)) {
url = this.baseUrl + "?mixid=" + this.shopId; url = this.baseUrl + "?mixid=" + this.shopId;
} }
console.log("+++++", this.shareOrderSn); console.log("+++++", this.shareOrderSn);
//有订单为送礼页面 //有订单为送礼订单分享
if (this.shareOrderSn != "") { if (this.shareOrderSn != "") {
url = `${this.baseUrl}/activty/receivingGift?mixid=${ url = `${this.baseUrl}/activty/receivingGift?mixid=${
this.shopId this.shopId
}&orderSn=${this.shareOrderSn}&shareTid=${this.shareTid}`; }&orderSn=${this.shareOrderSn}&shareTid=${this.shareTid}`;
} }
//分销员推广页面 默认分享分销员中心页面
if (url.indexOf("/personalCenter/spokesmanCenter/mine/popularize") > -1) {
url = `${this.baseUrl}/personalCenter/spokesmanCenter?mixid=${
this.shopId
}`;
}
//增加分销员信息 //增加分销员信息
this.newHref = `&spokesmanGroupId=${
21
}&spokesmanShopId=${48}&spokesmanRelId=${
175
}`;
this.shareUrl = url + this.newHref; this.shareUrl = url + this.newHref;
console.log(this.shareUrl, "index12"); console.log(this.shareUrl, "index12");
......
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