This commit is contained in:
yanran200730
2023-03-21 15:23:22 +08:00
2 changed files with 11 additions and 3 deletions

View File

@@ -106,7 +106,7 @@ export const user = {
confirmText: '去认证', confirmText: '去认证',
success: (res)=> { success: (res)=> {
if (res.confirm) { 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) { } else if (res.cancel) {
// 停留 // 停留
} }

View File

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