From 73ce985d9a715c1998da7308d377791ffc435993 Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Tue, 13 Dec 2022 09:16:36 +0800 Subject: [PATCH] update --- WebRoot/html/tp/index.html | 20 +++++++------------ WebRoot/html/tp/result.html | 39 ++++++++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/WebRoot/html/tp/index.html b/WebRoot/html/tp/index.html index d190361..9c22d1d 100644 --- a/WebRoot/html/tp/index.html +++ b/WebRoot/html/tp/index.html @@ -142,11 +142,11 @@ advancedArr[i] = $(this).val(); }); if (advancedArr.length == 0) { - layer.msg('请推荐高级教师 2 人!', { icon: 2, time: 3000, shade: [0.1, '#000', true] }); + layer.msg('请推荐高级教师 2 人!', { icon: 2, time: 2500, shade: [0.1, '#000', true] }); return; } if (advancedArr.length != 2) { - layer.msg('高级教师允许推荐 2 人!', { icon: 2, time: 3000, shade: [0.1, '#000', true] }); + layer.msg('高级教师只允许推荐 2 人!', { icon: 2, time: 2500, shade: [0.1, '#000', true] }); return; } @@ -155,11 +155,11 @@ middleArr[i] = $(this).val(); }); if (middleArr.length == 0) { - layer.msg('请推荐中级教师 2 人!', { icon: 2, time: 3000, shade: [0.1, '#000', true] }); + layer.msg('请推荐中级教师 2 人!', { icon: 2, time: 2500, shade: [0.1, '#000', true] }); return; } if (middleArr.length != 2) { - layer.msg('中级教师允许推荐 2 人!', { icon: 2, time: 3000, shade: [0.1, '#000', true] }); + layer.msg('中级教师只允许推荐 2 人!', { icon: 2, time: 2500, shade: [0.1, '#000', true] }); return; } @@ -173,21 +173,15 @@ }, success: function (data) { if (data.success) { - layer.msg(data.message, { icon: 1, time: 2000, shade: [0.1, '#000', true] }); - window.location = "./result.html"; + layer.msg(data.message, { icon: 1, time: 2000, shade: [0.1, '#000', true] }, function () { + window.location = "./result.html"; + }); } else { layer.msg(data.message, { icon: 2, time: 2500, shade: [0.1, '#000', true] }); } - } }); - - - - - - return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 }); diff --git a/WebRoot/html/tp/result.html b/WebRoot/html/tp/result.html index 5eb34a5..d33e6ea 100644 --- a/WebRoot/html/tp/result.html +++ b/WebRoot/html/tp/result.html @@ -1,5 +1,6 @@ + 成功 @@ -7,19 +8,35 @@ + -
-
-
-
- -
-

投票成功!

+
+
+
+
+ +
+

投票成功!

+
-
- - + + + - + + \ No newline at end of file