Commit 8af70917 by 程智春

扫码pid

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