From 241e7da610e23df7143979508f42f0f1b2f9d872 Mon Sep 17 00:00:00 2001 From: chenlinlin Date: Fri, 30 May 2025 19:14:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E8=A1=8C=E6=94=BF=E8=AE=B8?= =?UTF-8?q?=E5=8F=AF=E7=AD=89=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=88=A0=E6=94=B9?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/views/big-screen/bigdata.vue | 2 +- client/src/views/main/index.vue | 19 +++++++++++++++++++ .../repository/ZfzbglRepository.java | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/client/src/views/big-screen/bigdata.vue b/client/src/views/big-screen/bigdata.vue index 883d3fb..fb01148 100644 --- a/client/src/views/big-screen/bigdata.vue +++ b/client/src/views/big-screen/bigdata.vue @@ -11,7 +11,7 @@
-
返回
+
返回首页
diff --git a/client/src/views/main/index.vue b/client/src/views/main/index.vue index 2e8ee33..615fc30 100644 --- a/client/src/views/main/index.vue +++ b/client/src/views/main/index.vue @@ -26,6 +26,25 @@ } } + const handleUserInfo = async () => { + try { + if (!userStore.token) { + await handleLogin() + // 忘记写return导致后面的业务依然在运行。 + return + } + // 获取用户信息并持久化到浏览器 + await userStore.getUserInfo() + // 在url没有hash url的时候路由跳转首页 + const hashUrl = window.location.hash.slice(1) + if (hashUrl && hashUrl === '/') { + //route.push('/svi/index') + route.push('/big-screen') + } + } catch (error) { + handleLogin() + } + } const handleLogin = async () => { try { diff --git a/server/src/main/java/com/aisino/iles/lawenforcement/repository/ZfzbglRepository.java b/server/src/main/java/com/aisino/iles/lawenforcement/repository/ZfzbglRepository.java index 6dd7c3a..0a93df3 100644 --- a/server/src/main/java/com/aisino/iles/lawenforcement/repository/ZfzbglRepository.java +++ b/server/src/main/java/com/aisino/iles/lawenforcement/repository/ZfzbglRepository.java @@ -24,6 +24,7 @@ public interface ZfzbglRepository extends BaseRepo { " from Zfzbgl a" + " where 1=1 " + " group by a.zblxdm") + List syStatistics();