From c755c856dffb98fe1a34f9f8ded92d0cff278332 Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期一, 31 三月 2025 11:00:33 +0800
Subject: [PATCH] 打包配置修改、401拦截跳转管理后台

---
 src/views/DataScreen.vue |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/views/DataScreen.vue b/src/views/DataScreen.vue
index aba7d2d..3dd7e9a 100644
--- a/src/views/DataScreen.vue
+++ b/src/views/DataScreen.vue
@@ -18,6 +18,9 @@
 import RightPanel from '@/components/RightPanel.vue'
 import BottomCharts from '@/components/BottomCharts.vue'
 import { getStaticsData, getRentRank, getRentIncomeTrend, getTenantCountTrend } from '@/components/service'
+import {
+  Message
+} from 'element-ui'
 
 export default {
   name: 'DataScreen',
@@ -41,6 +44,16 @@
     if (this.$route.query.token || localStorage.getItem('token')) {
       localStorage.setItem('token', 'Bearer ' + this.$route.query.token)
       this.fetchData()
+    } else {
+      Message({
+        message: '登录已过期,请重新登录',
+        type: 'warning',
+        duration: 2000
+      })
+      setTimeout(() => {
+        localStorage.clear();
+        window.location.replace(`https://xzgt.test.591taxi.cn/web/?#/login`);
+      }, 2000)
     }
   },
   methods: {
@@ -69,13 +82,13 @@
 }
 
 /* 添加全局字体声明 */
-@font-face {
+/* @font-face {
   font-family: 'DIN';
   src: url('https://fonts.cdnfonts.com/css/din-next-lt-arabic') format('woff2');
   font-weight: normal;
   font-style: normal;
   font-display: swap;
-}
+} */
 
 .main-content {
   flex: 1;

--
Gitblit v1.7.1