From 32febb140d320b35d580c8d4e78a80ef846e75fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 19 Dec 2025 15:59:34 +0800
Subject: [PATCH] feat:webview通信处理

---
 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