From 4648a3bee638e9a99d2d80b66f8833b261a2db91 Mon Sep 17 00:00:00 2001 From: wlzboy <66905212@qq.com> Date: 星期四, 25 九月 2025 22:39:24 +0800 Subject: [PATCH] feat:设计 app ui --- ruoyi-ui/src/permission.js | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 5256c2c..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) { @@ -47,7 +56,7 @@ } } } else { - debugger; + // 娌℃湁token if (isWhiteList(to.path) || to.meta.anonymous) { // 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆 -- Gitblit v1.9.1