From bdb924aaaef6a8d282ed2d34850cfd229d5865c7 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期一, 08 十二月 2025 09:31:42 +0800
Subject: [PATCH] #增加许可证
---
src/main/webapp/views/admin/index.html | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/views/admin/index.html b/src/main/webapp/views/admin/index.html
index e9d4c80..7de0996 100644
--- a/src/main/webapp/views/admin/index.html
+++ b/src/main/webapp/views/admin/index.html
@@ -18,6 +18,28 @@
font-weight: 400;
/*margin-left: 5px;*/
}
+
+ /* 寮圭獥鏍峰紡 */
+ .popup {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,0.5);
+ display: none;
+ justify-content: center;
+ align-items: center;
+ z-index: 9999;
+ }
+
+ .popup-content {
+ background-color: #fff;
+ padding: 20px;
+ border-radius: 5px;
+ box-shadow: 0px 0px 20px rgba(0,0,0,0.3);
+ text-align: center;
+ }
</style>
</head>
<body class="layui-layout-body">
@@ -100,6 +122,30 @@
}
});
+ // 鏄剧ず寮圭獥
+ function showPopup(res) {
+ document.getElementById('popup').style.display = 'block';
+ // 鑾峰彇寮瑰嚭绐楀彛鍐呭鐨勫鍣ㄥ厓绱�
+ var popupText = document.getElementById('popup-text');
+ // 鍋囪鍚庡彴杩斿洖鐨勫瓧绗︿覆涓� responseString
+ if (res!==""){
+ // 鑾峰彇褰撳墠鏃ユ湡
+ const currentDate = new Date();
+ // 鍒涘缓鏂版棩鏈熷璞″苟娣诲姞澶╂暟
+ const newDate = new Date();
+ newDate.setDate(currentDate.getDate() + res + 1);
+ // 灏嗗瓧绗︿覆璁剧疆涓哄脊绐楀唴瀹圭殑鏂囨湰
+ popupText.textContent = "璁稿彲璇佸皢浜�" + new Intl.DateTimeFormat('zh-CN').format(newDate) + "杩囨湡锛屽墿浣欐湁鏁堟湡:" + res + "澶╋紒";
+ }else {
+ document.getElementById('popup').style.display = 'none';
+ }
+ }
+
+ // 闅愯棌寮圭獥
+ function hidePopup() {
+ document.getElementById('popup').style.display = 'none';
+ }
+
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
@@ -153,6 +199,10 @@
$("#licenseShow").show()
$("#licenseDays").html(days)
}
+
+ if (days <= 15) {
+ showPopup(days)
+ }
}else {
top.location.href = baseUrl + "/login";
}
--
Gitblit v1.9.1