Commit b6cb2eb0 by 张卓

支持道可分享

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