返回tabbar

This commit is contained in:
shijingjing
2023-03-21 15:19:57 +08:00
parent 617eb16ba2
commit 801db611c6
2 changed files with 11 additions and 3 deletions

View File

@@ -106,7 +106,7 @@ export const user = {
confirmText: '去认证',
success: (res)=> {
if (res.confirm) {
uni.reLaunch({ url: '/pages/AppMine/userInfo' })
uni.reLaunch({ url: `/pages/AppMine/userInfo?isFromTabbar=1&path='/pages/AppHome/AppHome'` })
} else if (res.cancel) {
// 停留
}

View File

@@ -75,7 +75,9 @@ export default {
computed: {
...mapState(['user', 'token']),
},
onLoad() {
onLoad(o) {
this.isFromTabbar = o.isFromTabbar
this.path = o.path
this.getUserInfo('qujing')
uni.setNavigationBarTitle({
title: '个人中心'
@@ -97,6 +99,8 @@ export default {
userAreaId: '',
userAreaName: '',
btnText: false,
isFromTabbar: '',
path: '',
}
},
methods: {
@@ -155,7 +159,11 @@ export default {
this.autoLogin({ loginWay:'qujing'})
uni.$emit('auth')
setTimeout(() => {
uni.navigateBack()
if(this.isFromTabbar==1) {
uni.switchTab({ url: this.path})
} else {
uni.navigateBack()
}
}, 600);
}
}).catch(err=> {