This commit is contained in:
那些花儿
2025-04-30 10:12:46 +08:00
parent bb394ce8e3
commit 29d286319a
5 changed files with 102 additions and 31 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
<script>
import {setupRouterInterceptor, getDefaultWhiteList} from './utils/routerInterceptor'
import {checkAuth, setupRouterInterceptor, getDefaultWhiteList} from './utils/routerInterceptor'
export default {
globalData: {
@@ -7,7 +7,9 @@ export default {
},
onLaunch: function () {
console.log('App Launch')
console.log(process.env.VUE_APP_PLATFORM)
// 检查访问页面是否需要登录(不走拦截器 直接从地址栏进入)
checkAuth()
// 初始化路由拦截器
setupRouterInterceptor(getDefaultWhiteList())
},