Commit 550108f2 by 李嘉林

修改

parent b37ec792
......@@ -79,7 +79,7 @@ export default {
url: `../login/main?scene=sso&isEncode=1&back=${link}`,
});
} else {
this.getSsoBcakUrl(decodeURIComponent(link));
this.getSsoBcakUrl(decodeURIComponent(link).replace(/\/\?(.+?)#\//, '/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'));
}
}
} else if (options.link) {
......@@ -102,7 +102,7 @@ export default {
this.setLink(decodeURIComponent(link));
}
} else {
this.getSsoBcakUrl(decodeURIComponent(link));
this.getSsoBcakUrl(decodeURIComponent(link).replace(/\/\?(.+?)#\//, '/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'));
}
} else if (getUrlKey(decodeURIComponent(link), "login") != "1") {
//判断是否需要带token
......@@ -161,9 +161,16 @@ export default {
if(url.indexOf('setToken={token}') == -1) {
url = decodeURIComponent(url).replace(/\/\?(.+?)#\//, '/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/');
}
console.log(url,'-------------164')
//分享页面去掉登录态
if (url.indexOf("sessionid") > -1) {
if (url.includes('taokor')) {
if (url.includes('&sessionid')) {
url = url.split('&sessionid')[0];
}
} else {
url = url.split("?")[0] + "?mixid=" + this.shopId;
}
}else if(url.indexOf('getMixId') > -1) {//分享链接需要带mixid
url = forUrlAddKey(url,{mixid: this.shopId})
}
......@@ -204,7 +211,7 @@ export default {
this.getSsoBcakUrl(decodeURIComponent(this.link));
}
if ((!this.link.includes('sessionid')) && wx.getStorageSync("sessionid")) {
this.link +=`${this.link.includes('?')?'&':'?'}sessionid=${wx.getStorageSync("sessionid")}`
this.link +=`${this.link.includes('?') && !this.link.includes('#/') || (this.link.split('?').length - 1 > 1) ?'&':'?'}sessionid=${wx.getStorageSync("sessionid")}`
}
this.useLink = this.link;
console.log(this.useLink,'--this.useLink')
......
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