123456789101112131415161718192021222324 |
- <template>
- <view></view>
- </template>
- <script>
- export default {
- onLoad() {
- this.$toast('登录成功')
- const url = uni.getStorageSync('LOGIN_REDIRECT_URL')
- if (url) {
- if (url.indexOf('tabBar') > -1) {
- uni.switchTab({ url })
- } else {
- uni.redirectTo({ url })
- }
- } else {
- uni.switchTab({ url: '/pages/tabBar/user/user' })
- }
- },
- beforeDestroy() {
- uni.removeStorageSync('LOGIN_REDIRECT_URL')
- }
- }
- </script>
|