From 4cf74834fe5ac6229035b72312b75958495e60d3 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 19 八月 2025 15:35:08 +0800
Subject: [PATCH] 1
---
src/main.js | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/main.js b/src/main.js
index 81a1d7d..a98eff1 100644
--- a/src/main.js
+++ b/src/main.js
@@ -16,7 +16,7 @@
import Print from "vue-print-nb";
import JsonExcel from "vue-json-excel";
-
+import '@/utils/rem.js'; //鍦╩ain.js涓紩鍏em.js
Vue.component("downloadExcel", JsonExcel);
import "./assets/icons"; // icon
@@ -34,14 +34,6 @@
// 鍒嗛〉缁勪欢
import Pagination from "@/components/Pagination";
// 鍒嗛〉缁勪欢
-
-import { monitorZoom } from "@/utils/devicePixelRatio.js";
-const m = monitorZoom();
-if (window.screen.width * window.devicePixelRatio >= 3840) {
- document.body.style.zoom = 100 / (Number(m) / 2); // 灞忓箷涓� 4k 鏃�
-} else {
- document.body.style.zoom = 100 / Number(m);
-}
// 鑷畾涔夎〃鏍煎伐鍏风粍浠�
import RightToolbar from "@/components/RightToolbar";
@@ -106,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