From 01f7c84cb45b20273a299374e9ef7311b9b274f1 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期二, 02 九月 2025 16:04:56 +0800
Subject: [PATCH] 许可证到期提醒,系统30分钟无操作下线账号
---
src/main/webapp/views/index.html | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 7b40043..346bf97 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -29,7 +29,7 @@
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
- display: flex;
+ display: none;
justify-content: center;
align-items: center;
z-index: 9999;
@@ -41,10 +41,6 @@
border-radius: 5px;
box-shadow: 0px 0px 20px rgba(0,0,0,0.3);
text-align: center;
- }
-
- button:hover {
- background-color: #0069d9;
}
</style>
</head>
@@ -120,7 +116,6 @@
<div class="popup-content">
<h2 style="font-size: 28px;margin-bottom: 10px;">璁稿彲璇佸嵆灏嗚繃鏈�</h2>
<div id="popup-text" style="font-size: 28px;color: red"></div>
- <p style="font-size: 26px;margin-bottom: 20px;margin-top: 20px;color: blue">璇疯仈绯荤珛搴撳叕鍙稿晢鍔$画绾�!!!</p>
<button style="background-color: #007bff;color: #fff;border: none;padding: 10px 20px;border-radius: 5px;cursor: pointer;font-size: 16px;" onclick="hidePopup()">鍏抽棴</button>
</div>
</div>
@@ -133,11 +128,13 @@
var popupText = document.getElementById('popup-text');
// 鍋囪鍚庡彴杩斿洖鐨勫瓧绗︿覆涓� responseString
if (res!=""){
- var responseString = "璁稿彲璇佸嵆灏嗚繃鏈燂紝鍓╀綑鏈夋晥鏈�:"+res+"澶╋紒";
+ // 鑾峰彇褰撳墠鏃ユ湡
+ const currentDate = new Date();
+ // 鍒涘缓鏂版棩鏈熷璞″苟娣诲姞澶╂暟
+ const newDate = new Date();
+ newDate.setDate(currentDate.getDate() + res + 1);
// 灏嗗瓧绗︿覆璁剧疆涓哄脊绐楀唴瀹圭殑鏂囨湰
- popupText.textContent = responseString;
- //鍏抽棴璁惧
- // document.getElementById('popup').style.display = 'none';
+ popupText.textContent = "璁稿彲璇佸皢浜�" + new Intl.DateTimeFormat('zh-CN').format(newDate) + "杩囨湡锛屽墿浣欐湁鏁堟湡:" + res + "澶╋紒";
}else {
document.getElementById('popup').style.display = 'none';
}
@@ -164,7 +161,7 @@
success: function (res) {
if (res.code == 200) {
let days = res.data
- if (days <= 30) {
+ if (days <= 15) {
showPopup(res.data)
} else {
showPopup("");
--
Gitblit v1.9.1