From 94a76a72a4aef683edc4f54da9d9ea62b611919f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Mon, 25 Sep 2023 14:32:54 +0800 Subject: [PATCH] update index page --- server/src/main/resources/web/main/index.ftl | 45 ++++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/server/src/main/resources/web/main/index.ftl b/server/src/main/resources/web/main/index.ftl index 964d854e..b292444e 100644 --- a/server/src/main/resources/web/main/index.ftl +++ b/server/src/main/resources/web/main/index.ftl @@ -8,7 +8,6 @@ - @@ -35,11 +34,12 @@
+ -
+
@@ -179,25 +179,24 @@ $("#deleteCaptchaImg").click(function() { $("#deleteCaptchaImg").attr("src","${baseUrl}deleteFile/captcha?timestamp=" + new Date().getTime()); }); + $("#deleteCaptchaConfirmBtn").click(function() { + var fileName = $("#deleteCaptchaFileName").val(); + var deleteCaptchaText = $("#deleteCaptchaText").val(); + $.get('${baseUrl}deleteFile?fileName=' + fileName +'&password=' + deleteCaptchaText, function(data){ + if ("删除文件失败,密码错误!" === data.msg) { + alert(data.msg); + } else { + $('#table').bootstrapTable("refresh", {}); + $("#deleteCaptchaText").val(""); + $("#deleteCaptchaModal").modal("hide"); + } + }); + }); function deleteFile(fileName) { + $("#deleteCaptchaImg").click(); + $("#deleteCaptchaFileName").val(fileName); + $("#deleteCaptchaText").val(""); $("#deleteCaptchaModal").modal("show"); - $("#deleteCaptchaConfirmBtn").click(function() { - var deleteCaptchaText = $("#deleteCaptchaText").val(); - $.ajax({ - url: '${baseUrl}deleteFile?fileName=' + fileName +'&password=' + deleteCaptchaText, - success: function(data) { - if ("删除文件失败,密码错误!" === data.msg) { - alert(data.msg); - } else { - //刷新验证码 - $("#deleteCaptchaImg").click(); - $('#table').bootstrapTable("refresh", {}); - $("#deleteCaptchaText").val("") - $("#deleteCaptchaModal").modal("hide"); - } - } - }) - }); } <#else> function deleteFile(fileName) {