From cf422fa7cc284db857a9fca6d098b1b873fe6a5d Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期二, 15 七月 2025 09:22:30 +0800
Subject: [PATCH] zongjiancopy

---
 src/main.js |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main.js b/src/main.js
index 42f906b..a98eff1 100644
--- a/src/main.js
+++ b/src/main.js
@@ -98,6 +98,22 @@
 
 Vue.config.productionTip = false;
 
+let lastVersion = localStorage.getItem('appVersion');
+const checkVersion = async () => {
+  const res = await axios.get('/api/version'); // 杩斿洖褰撳墠鐗堟湰鍙�
+  if (res.data.version !== lastVersion) {
+    localStorage.setItem('appVersion', res.data.version);
+    // ElMessageBox.confirm('妫�娴嬪埌鏂扮増鏈紝鏄惁鍒锋柊锛�', '鎻愮ず', {
+    //   confirmButtonText: '鍒锋柊',
+    // }).then(() => {
+      window.location.reload(true); // 寮哄埗鍒锋柊
+    // });
+  }
+};
+
+// 瀹氭椂妫�鏌ワ紙濡傛瘡灏忔椂涓�娆★級
+setInterval(checkVersion, 60 * 60 * 1000);
+
 new Vue({
   el: "#app",
   router,

--
Gitblit v1.8.0