Commit 291aa394 by 张卓

优化道可分享功能

parent 3fe47975
......@@ -30,8 +30,6 @@ export default {
},
async onLoad(options) {
this.link='';
console.log(options, "第三方页面");
/**
* scene=sso 第三方需要登录的页面
* login=1 jwt需要登录(临时方案)
......@@ -69,7 +67,7 @@ export default {
//判断是否需要带token
if(decodeURIComponent(link).indexOf('setToken={token}') > -1) {
if (wx.getStorageSync("sessionid")) {
this.setLink(decodeURIComponent(link).replace('setToken=${token}','token=' + wx.getStorageSync("sessionid")));
this.setLink(decodeURIComponent(link).replace('setToken={token}','token=' + wx.getStorageSync("sessionid")));
} else {
let url = `/pages/login/main?scene=sso&back=${link}`;
wx.navigateTo({
......@@ -105,7 +103,10 @@ export default {
} else {
url = res.webViewUrl;
}
url = removeUrlKey(url, ["token"]);
console.log(removeUrlKey(url, ["token"]),777777777)
if(url.indexOf('setToken={token}') == -1) {
url = removeUrlKey(url, ["token"]);
}
//分享页面去掉登录态
if (url.indexOf("sessionid") > -1) {
url = url.split("?")[0] + "?mixid=" + this.shopId;
......
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