From c1b33671b42e5d2d11f0c8a0fea31bfbe0b35b38 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 13 Oct 2025 11:16:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/plugins/permission.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/permission.js b/src/plugins/permission.js
index 4e871c3..0700fc8 100644
--- a/src/plugins/permission.js
+++ b/src/plugins/permission.js
@@ -5,7 +5,7 @@
removeQueryString,
routes
} from "@/router"
-import { isLogin } from "@/utils/auth"
+import {useUserStore} from "@/store/index.js";
// 白名单路由
const whiteList = ["/"]
@@ -28,7 +28,7 @@
return false
}
// 在白名单中或有token,直接放行
- const hasPermission = whiteList.includes(removeQueryString(path)) || isLogin()
+ const hasPermission = whiteList.includes(removeQueryString(path)) || useUserStore().$state.userInfo.access_token
if (!hasPermission) {
// 将用户的目标路径传递过去,这样可以实现用户登录之后,直接跳转到目标页面
uni.redirectTo({
--
Gitblit v1.9.3