Commit 02f99356 by 程默

道客兼容

parent 5a480118
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
test_isHaveUnion: "", test_isHaveUnion: "",
test_unionId: "", test_unionId: "",
fromType:'',//来源类型 mini:小程序跳转到当前登录页 fromType:'',//来源类型 mini:小程序跳转到当前登录页
scene:''//场景
}; };
}, },
created() {}, created() {},
...@@ -96,6 +97,7 @@ export default { ...@@ -96,6 +97,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化 Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
options.scene && (this.scene=options.scene)
if (options.back) { if (options.back) {
this.backPath = options.back; this.backPath = options.back;
} }
...@@ -313,6 +315,10 @@ export default { ...@@ -313,6 +315,10 @@ export default {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}); });
}else if (this.scene=='sso') {
wx.redirectTo({
url: `../wxArticle/main?link=${this.backPath}`,
});
}else{ }else{
wx.reLaunch({ wx.reLaunch({
url: `../index/main?from=login&backpath=${ url: `../index/main?from=login&backpath=${
......
...@@ -25,8 +25,14 @@ export default { ...@@ -25,8 +25,14 @@ export default {
} }
}, },
onLoad(options){ onLoad(options){
if (options.scene=='sso' && !wx.getStorageSync("sessionid")) {
wx.redirectTo({
url: `../login/main?scene=sso&back=${link}`
});
}else{
console.log(decodeURIComponent(options.link),'地址') console.log(decodeURIComponent(options.link),'地址')
this.link = decodeURIComponent(options.link) this.link = decodeURIComponent(options.link)
}
}, },
methods: { methods: {
//加载成功 //加载成功
......
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