Commit 57230b29 by 张卓

第三方跳转带mixid

parent 9e6b1ce9
...@@ -38,35 +38,44 @@ export default { ...@@ -38,35 +38,44 @@ export default {
//扫码 //扫码
let data = await this.getParams(options.scene); let data = await this.getParams(options.scene);
if (data.sso) { if (data.sso) {
let link = data.link;
if(getUrlKey(decodeURIComponent(link), "getMixId") == '1') {//第三方跳转加mixid
link = forUrlAddKey(decodeURIComponent(link),{mixid: this.$store.state.mixid})
}
if (!wx.getStorageSync("sessionid")) { if (!wx.getStorageSync("sessionid")) {
wx.redirectTo({ wx.redirectTo({
url: `../login/main?scene=sso&back=${data.link}`, url: `../login/main?scene=sso&back=${link}`,
}); });
} else { } else {
this.getSsoBcakUrl(decodeURIComponent(data.link)); this.getSsoBcakUrl(decodeURIComponent(link));
} }
} }
} else if (options.link) { } else if (options.link) {
if (getUrlKey(decodeURIComponent(options.link), "scene") == "sso") { let link = options.link;
if(getUrlKey(decodeURIComponent(link), "getMixId") == '1') {//第三方跳转加mixid
link = forUrlAddKey(decodeURIComponent(link),{mixid: this.$store.state.mixid})
}
console.log(wx.getStorageSync("sessionid"),446466777777,getUrlKey(decodeURIComponent(link), "mixid"),this.$store.state.mixid)
if (getUrlKey(decodeURIComponent(link), "scene") == "sso") {
if (!wx.getStorageSync("sessionid")) { if (!wx.getStorageSync("sessionid")) {
wx.redirectTo({ wx.redirectTo({
url: `../login/main?scene=sso&back=${options.link}`, url: `../login/main?scene=sso&back=${link}`,
}); });
} else { } else {
this.getSsoBcakUrl(decodeURIComponent(options.link)); this.getSsoBcakUrl(decodeURIComponent(link));
} }
} else if (getUrlKey(decodeURIComponent(options.link), "login") != "1") { } else if (getUrlKey(decodeURIComponent(link), "login") != "1") {
this.setLink(decodeURIComponent(options.link)); this.setLink(decodeURIComponent(link));
} else { } else {
if (wx.getStorageSync("sessionid")) { if (wx.getStorageSync("sessionid")) {
this.setLink( this.setLink(
forUrlAddKey(decodeURIComponent(options.link), { forUrlAddKey(decodeURIComponent(link), {
token: wx.getStorageSync("sessionid"), token: wx.getStorageSync("sessionid"),
jwt: 1, jwt: 1,
}) })
); );
} else { } else {
let url = `/pages/login/main?scene=sso&back=${options.link}`; let url = `/pages/login/main?scene=sso&back=${link}`;
wx.navigateTo({ wx.navigateTo({
url, url,
}); });
......
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