Commit 8af70917 by 程智春

扫码pid

parent 3bee0938
...@@ -30,13 +30,14 @@ export default { ...@@ -30,13 +30,14 @@ export default {
spokesmanGroupId: "", // 代言人的集团id spokesmanGroupId: "", // 代言人的集团id
spokesmanShopId: "", // 代言人的门店id spokesmanShopId: "", // 代言人的门店id
spokesmanRelId: "", //代言人的id spokesmanRelId: "", //代言人的id
userId : '',
hasInvitationStatus: 0, // 邀请资格:0-不能够邀请下级,1-能够邀请下级 hasInvitationStatus: 0, // 邀请资格:0-不能够邀请下级,1-能够邀请下级
newHref: "", newHref: "",
shareShopName: "", shareShopName: "",
shareLogoUrl: "", shareLogoUrl: "",
shareOrderSn: "", shareOrderSn: "",
shareTid: "", shareTid: "",
shareImgUrl : '', newWindowHref : '',
sharePageList: [ sharePageList: [
"goods/", "goods/",
"receivingGift", "receivingGift",
...@@ -69,6 +70,7 @@ export default { ...@@ -69,6 +70,7 @@ export default {
this.spokesmanShopId = this.spokesmanShopId =
getQueryVariable(this.link, "spokesmanShopId") || ""; getQueryVariable(this.link, "spokesmanShopId") || "";
this.spokesmanRelId = getQueryVariable(this.link, "spokesmanRelId") || ""; this.spokesmanRelId = getQueryVariable(this.link, "spokesmanRelId") || "";
this.userId = getQueryVariable(this.link, "userId") || "";
if (this.spokesmanGroupId != "") { if (this.spokesmanGroupId != "") {
//分销员分享 //分销员分享
this.$store.commit("setSpokesman", { this.$store.commit("setSpokesman", {
...@@ -114,27 +116,50 @@ export default { ...@@ -114,27 +116,50 @@ export default {
var scene = decodeURIComponent(options.scene); //参数二维码传递过来的参数 var scene = decodeURIComponent(options.scene); //参数二维码传递过来的参数
let querys = scene.split("_"); let querys = scene.split("_");
if (querys) { if (querys) {
if (querys[0] == "goods") { if (querys[0] == "pid") {
//商品详情 pid_123 //商品详情 pid_123
this.page = `/goods/${querys[1]}`; this.page = `/goods/${querys[1]}`;
this.params += `&spokesmanGroupId=${querys[2]}&spokesmanShopId=${ if(querys.length > 3){
querys[3] if(querys[5]){
}&spokesmanRelId=${querys[4]}&usedId=${querys[5]}`; this.params += `&spokesmanGroupId=${querys[2]}&spokesmanShopId=${querys[3]}&spokesmanRelId=${querys[4]}$userId=${querys[5]}`
}else{
this.params += `&spokesmanGroupId=${querys[2]}&spokesmanShopId=${querys[3]}&spokesmanRelId=${querys[4]}`
}
}else if(querys.length == 3){
this.params += `&userId=${querys[1]}`
}
} else if (querys[0] == "activty") { } else if (querys[0] == "activty") {
//活动页面activty_turntable_123 //活动页面activty_turntable_123
this.params += `&pageInfo=${scene}`; this.params += `&pageInfo=${scene}`;
} else if (querys[0] == "spokesman") { } else if (querys[0] == "spokesman") {
//分销员 小程序码 //分销员 小程序码
this.page = `/personalCenter/spokesmanCenter`; this.page = `/personalCenter/spokesmanCenter`;
if(querys.length > 4){
this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${ this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${
querys[2] querys[2]
}&spokesmanRelId=${querys[3]}&usedId=${querys[4]}`; }&spokesmanRelId=${querys[3]}&usedId=${querys[4]}&=${querys[5]}`;
}else if(querys[0] == "home"){ }else{
this.page = `/`;
this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${ this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${
querys[2] querys[2]
}&spokesmanRelId=${querys[3]}&usedId=${querys[4]}`; }&spokesmanRelId=${querys[3]}&usedId=${querys[4]}`;
} }
}else if(querys[0] == "home"){
this.page = `/`;
if(querys.length > 2){
if(querys[4]){
this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${querys[2]}&spokesmanRelId=${querys[3]}$userId=${querys[4]}`
}else{
this.params += `&spokesmanGroupId=${querys[1]}&spokesmanShopId=${querys[2]}&spokesmanRelId=${querys[3]}`
}
}else if(querys.length == 2){
this.params += `&userId=${querys[1]}`
}
}
} }
console.log(querys, "scene"); console.log(querys, "scene");
console.log(this.page) console.log(this.page)
...@@ -248,8 +273,8 @@ export default { ...@@ -248,8 +273,8 @@ export default {
//分享内容中有订单信息为送礼活动 //分享内容中有订单信息为送礼活动
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;
this.shareImgUrl = res.target.data[len].shareImgUrl; this.newWindowHref = res.target.data[len].shareImgUrl;
console.log("分享信息:", this.shareLogoUrl, this.shareShopName,this.shareImgUrl); console.log("分享信息:", this.shareLogoUrl, this.shareShopName,this.newWindowHref);
}, },
checkPageUrl(val) { checkPageUrl(val) {
for (let i = 0; i < this.sharePageList.length; i++) { for (let i = 0; i < this.sharePageList.length; i++) {
...@@ -273,8 +298,8 @@ export default { ...@@ -273,8 +298,8 @@ export default {
this.shareLogoUrl this.shareLogoUrl
); );
let url = '' let url = ''
if(this.shareImgUrl){ if(this.newWindowHref){
url = this.shareImgUrl; url = this.newWindowHref;
}else{ }else{
url = res.webViewUrl; url = res.webViewUrl;
} }
......
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