Commit 02f99356 by 程默

道客兼容

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