From 3fc27febccd04e2fcffbd2cdd16d2daafd0b3ca3 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 11 Oct 2025 17:23:27 +0800
Subject: [PATCH] feat:首页地图相关调整
---
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