Skip to content

Commit

Permalink
feat: 路由拦截全部加上
Browse files Browse the repository at this point in the history
  • Loading branch information
Burt committed Dec 31, 2024
1 parent e1da7af commit c47eb87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/interceptors/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 我这里应为大部分都可以随便进入,所以使用黑名单
*/
import { useUserStore } from '@/store'
import { getNeedLoginPages, needLoginPages as _needLoginPages } from '@/utils'
import { needLoginPages as _needLoginPages, getNeedLoginPages } from '@/utils'

// TODO Check
const loginRoute = '/pages/login/index'
Expand Down Expand Up @@ -49,5 +49,7 @@ export const routeInterceptor = {
uni.addInterceptor('navigateTo', navigateToInterceptor)
uni.addInterceptor('reLaunch', navigateToInterceptor)
uni.addInterceptor('redirectTo', navigateToInterceptor)
uni.addInterceptor('navigateBack', navigateToInterceptor)
uni.addInterceptor('switchTab', navigateToInterceptor)
},
}

0 comments on commit c47eb87

Please sign in to comment.