diff --git a/src/components/utils/modules.js b/src/components/utils/modules.js index c7cd1ba..c9377d2 100644 --- a/src/components/utils/modules.js +++ b/src/components/utils/modules.js @@ -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) { // 停留 } diff --git a/src/project/fengdu/AppMine/userInfo.vue b/src/project/fengdu/AppMine/userInfo.vue index 5ca0d33..6ba0271 100644 --- a/src/project/fengdu/AppMine/userInfo.vue +++ b/src/project/fengdu/AppMine/userInfo.vue @@ -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=> {