Commit b6cb2eb0 by 张卓

支持道可分享

parent 4a38c85b
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
async onLoad(options) { async onLoad(options) {
this.link=''; this.link='';
console.log(options, "第三方页面"); console.log(options, "第三方页面");
/** /**
* scene=sso 第三方需要登录的页面 * scene=sso 第三方需要登录的页面
* login=1 jwt需要登录(临时方案) * login=1 jwt需要登录(临时方案)
...@@ -65,7 +66,19 @@ export default { ...@@ -65,7 +66,19 @@ export default {
this.getSsoBcakUrl(decodeURIComponent(link)); this.getSsoBcakUrl(decodeURIComponent(link));
} }
} else if (getUrlKey(decodeURIComponent(link), "login") != "1") { } else if (getUrlKey(decodeURIComponent(link), "login") != "1") {
//判断是否需要带token
if(decodeURIComponent(link).indexOf('setToken={token}') > -1) {
if (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({
url,
});
}
}else {
this.setLink(decodeURIComponent(link)); this.setLink(decodeURIComponent(link));
}
} else { } else {
if (wx.getStorageSync("sessionid")) { if (wx.getStorageSync("sessionid")) {
this.setLink( this.setLink(
......
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