diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 203299b..d150213 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -8,7 +8,7 @@ export default { onLaunch: async function () { console.log('App Launch') // 检查访问页面是否需要登录(不走拦截器 直接从地址栏进入) - checkAuth() + await checkAuth() // 初始化路由拦截器 setupRouterInterceptor(getDefaultWhiteList()) }, diff --git a/frontend/src/utils/routerInterceptor.js b/frontend/src/utils/routerInterceptor.js index de92f73..3210941 100644 --- a/frontend/src/utils/routerInterceptor.js +++ b/frontend/src/utils/routerInterceptor.js @@ -101,7 +101,7 @@ async function routeInterceptor(args, whiteList) { cancelBtn: '取消', confirmBtn: '确认', onConfirm: () => { - uni.navigateTo({ + uni.redirectTo({ url: '/pages/login/index' }) },