Commit 550108f2 by 李嘉林

修改

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