From c2b88a03f3d0d5ebe92949e64d17ee4d0ac3f6b7 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 09 九月 2025 15:14:00 +0800
Subject: [PATCH] 发货清空缓存站点
---
zy-asrs-admin/src/views/IndexView.vue | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-admin/src/views/IndexView.vue b/zy-asrs-admin/src/views/IndexView.vue
index be72d95..f615790 100644
--- a/zy-asrs-admin/src/views/IndexView.vue
+++ b/zy-asrs-admin/src/views/IndexView.vue
@@ -204,18 +204,33 @@
const licenseDays = ref(365);
getLicenseDays();
function getLicenseDays() {
+ const currentDate = new Date();
+ const newDate = new Date(currentDate);
post('/api/license/getLicenseDays', {}).then((resp) => {
let result = resp.data;
let data = result.data;
if (result.code == 200) {
licenseDays.value = data;
if(data <= 15) {
- 銆�alert("璁稿彲璇佹湁鏁堟湡锛�" + data + "澶�")
+ newDate.setDate(currentDate.getDate() + data);
+ 銆�alert("璁稿彲璇佹湁鏁堟湡锛�" + data + "澶╋紝"銆�+銆�"鍒版湡鏃ユ湡锛�"銆�+銆�formatDate(newDate))
}
}
})
}
+// 瀹屾暣鐨勬棩鏈熸牸寮忓寲鍑芥暟
+function formatDate(date, format = 'yyyy-MM-dd') {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const day = String(date.getDate()).padStart(2, '0');
+
+ return format
+ .replace('yyyy', year)
+ .replace('MM', month)
+ .replace('dd', day);
+}
+
const switchHost = (item) => {
globalState.currentHost = item;
postForm('/api/root/change/host/auth', {
--
Gitblit v1.9.1