| | |
| | | function messageFun(e) { |
| | | if (e.data.type === "WEB_INVOKE_APPSERVICE") { |
| | | if (e.data.data.arg.type === "tokenExpired") { |
| | | return uni.redirectTo({ |
| | | return uni.reLaunch({ |
| | | url: "/pages/login/index", |
| | | }); |
| | | } |
| | |
| | | |
| | | function logOut() { |
| | | userStore.setUserInfo(null) |
| | | uni.redirectTo({ |
| | | uni.reLaunch({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | } |
| | |
| | | }); |
| | | clearForm(); |
| | | userStore.setUserInfo(null) |
| | | uni.redirectTo({ |
| | | uni.reLaunch({ |
| | | url: '/pages/login/index' |
| | | }) |
| | | |
| | |
| | | if (response.statusCode === 401) { |
| | | const pages = getCurrentPages() |
| | | const currentPage = pages[pages.length - 1] |
| | | uni.redirectTo({ |
| | | uni.reLaunch({ |
| | | url: `/pages/login/index?redirect=/${currentPage.route}` |
| | | }) |
| | | } |