From bc822c6ca3e1ce3e16a38ba877449fc697be9511 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期二, 06 十月 2026 14:09:41 +0800
Subject: [PATCH] fix(holiday): 折线图按标签精度绘制

---
 traffic-audit-web/src/views/Login.vue |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/traffic-audit-web/src/views/Login.vue b/traffic-audit-web/src/views/Login.vue
index 19ca936..c08362c 100644
--- a/traffic-audit-web/src/views/Login.vue
+++ b/traffic-audit-web/src/views/Login.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="login-container">
     <el-card class="login-card">
-      <h2>浜ら�氱粺璁℃姤琛ㄥ鏍哥郴缁�</h2>
+      <h2>浜ら�氱粺璁℃姤琛ㄥ鏍哥郴缁�<span class="login-version" v-if="version">V{{ version }}</span></h2>
       <el-form ref="form" :model="form" :rules="rules">
         <el-form-item prop="username">
           <el-input v-model="form.username" placeholder="鐢ㄦ埛鍚�" @keyup.enter.native="login"></el-input>
@@ -40,16 +40,27 @@
       captchaId: '',
       clickIds: [],
       loggingIn: false,
-      captchaRequired: true
+      captchaRequired: false,
+      version: ''
     }
   },
   created() {
+    axios.get('/api/version', { timeout: 10000 })
+      .then(res => {
+        const d = res.data
+        if (d && d.data && d.data.version) this.version = d.data.version
+      })
+      .catch(() => {})
+    // 楠岃瘉鐮佹槸鍚﹀惎鐢ㄤ竴寰嬩互鍚庣 /api/auth/captcha-config 涓哄噯锛�
+    // 榛樿涓嶆樉绀猴紝鍙湁鍚庣鏄庣‘杩斿洖 required=true 鎵嶆覆鏌撻獙璇佺爜缁勪欢銆�
+    // 淇锛氭鍓嶉粯璁� true 涓旇姹傚け璐ユ椂闈欓粯蹇界暐锛屽垏鎹㈢綉缁滃悗璇ラ厤缃涓嶅埌锛�
+    // 鐧诲綍椤靛氨浼氭畫鐣欎竴涓姞杞戒笉鍑烘潵鐨勯獙璇佺爜鐧芥骞舵彁绀衡�滈獙璇佺爜鍔犺浇澶辫触锛岃妫�鏌ョ綉缁溾�濄��
     axios.get('/api/auth/captcha-config', { timeout: 10000 })
       .then(res => {
         const d = res.data
-        if (d && d.code === 200) this.captchaRequired = d.data.required !== false
+        this.captchaRequired = !!(d && d.code === 200 && d.data && d.data.required === true)
       })
-      .catch(() => {})
+      .catch(() => { this.captchaRequired = false })
   },
   methods: {
     onCaptchaVerified(payload) {
@@ -110,5 +121,6 @@
 .captcha-skip-tip { font-size: 12px; color: #909399; line-height: 1.6; padding: 8px 10px; background: #F5F7FA; border-radius: 4px; }
 .login-card { width: 400px; }
 .login-card h2 { text-align: center; margin-bottom: 18px; }
+.login-version { font-size: 13px; font-weight: normal; color: #909399; margin-left: 8px; vertical-align: 3px; }
 .login-card .el-form-item { margin-bottom: 16px; }
 </style>

--
Gitblit v1.9.1