Commit 36db1918 authored by fwz's avatar fwz

登录跳转

parent 702fadd0
......@@ -58,6 +58,10 @@ export default {
scene : "",
//检查绑定挪车码
checkCode: {},
//上级url
superiorUrl: '/pages/main',
//上级路径参数
superiorParam: "index",
};
},
methods: {
......@@ -172,11 +176,18 @@ export default {
},
gotoIndex() {
let jumpUrl = this.superiorUrl
if(this.superiorUrl == '/pages/main'){
if(!this.superiorParam){
this.superiorParam = "0"
}
jumpUrl += "?index=" + this.superiorParam
}
//跳转到绑定页面
uni.reLaunch({ //信息更新成功后跳转到小程序首页
//todo 友众账号绑定界面暂缓
//url: '/pages/binding/binding'
url: '/pages/main'
url: jumpUrl
})
// uni.navigateTo({
......@@ -206,7 +217,14 @@ export default {
} else {
this.openid = openid;
}
if(e && e.url){
this.superiorUrl = e.url
if(e.index){
console.log(e.index)
this.superiorParam = e.index
}
}
// #ifdef MP-WEIXIN
if(e.scene) {
......
......@@ -31,7 +31,6 @@ export default {
},
data() {
return {
tab: "index",
}
},
......@@ -121,7 +120,18 @@ export default {
});
},
},
onLoad() {}
onLoad(option) {
if(option && option.index){
console.log(option.index)
console.log("---------------------------")
this.$nextTick(() => {
this.tabChange(parseInt(option.index))
this.$forceUpdate()
});
}
},
}
</script>
......
......@@ -58,6 +58,13 @@ export default {
},
methods: {
goUrl(vo) {
let token = uni.getStorageSync('userToken');
if(!token){
uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&index=1'
})
return;
}
const that = this
if (vo.title != "扫一扫联系车主") {
uni.navigateTo({
......
......@@ -142,6 +142,13 @@ export default {
});
},
goUrl(vo) {
let token = uni.getStorageSync('userToken');
if(!token){
uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&param=4'
})
return;
}
if (vo.title != '微信通知设置') {
uni.navigateTo({
url: vo.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