From 62a079a15b46925283581f6caaf631b5a4558927 Mon Sep 17 00:00:00 2001 From: wlzboy <66905212@qq.com> Date: 星期三, 24 九月 2025 11:00:10 +0800 Subject: [PATCH] feat: 初始化app --- ruoyi-ui/src/permission.js | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 7ab950d..ca6c9cf 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register','/anonymous/*'] +const whiteList = ['/login', '/register','/anonymous/*', '/h5/*'] const isWhiteList = (path) => { return whiteList.some(pattern => isPathMatch(pattern, path)) @@ -17,6 +17,14 @@ router.beforeEach((to, from, next) => { NProgress.start() + + // 璋冭瘯鏃ュ織 + console.log('=== 璺敱瀹堝崼璋冭瘯 ===') + console.log('鐩爣璺緞:', to.path) + console.log('瀹屾暣璺緞:', to.fullPath) + console.log('Token鐘舵��:', !!getToken()) + console.log('鐧藉悕鍗曟鏌�:', isWhiteList(to.path)) + if (getToken()) { to.meta.title && store.dispatch('settings/setTitle', to.meta.title) /* has token*/ @@ -24,6 +32,7 @@ next({ path: '/' }) NProgress.done() } else if (isWhiteList(to.path)) { + console.log('鉁� 鏈塗oken涓斿湪鐧藉悕鍗曪紝鐩存帴閫氳繃') next() } else { if (store.getters.roles.length === 0) { -- Gitblit v1.9.1