main
kgdxpr 3 years ago
parent aa66824047
commit 73ce985d9a

@ -142,11 +142,11 @@
advancedArr[i] = $(this).val(); advancedArr[i] = $(this).val();
}); });
if (advancedArr.length == 0) { 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; return;
} }
if (advancedArr.length != 2) { 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; return;
} }
@ -155,11 +155,11 @@
middleArr[i] = $(this).val(); middleArr[i] = $(this).val();
}); });
if (middleArr.length == 0) { 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; return;
} }
if (middleArr.length != 2) { 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; return;
} }
@ -173,21 +173,15 @@
}, },
success: function (data) { success: function (data) {
if (data.success) { if (data.success) {
layer.msg(data.message, { icon: 1, time: 2000, shade: [0.1, '#000', true] }); layer.msg(data.message, { icon: 1, time: 2000, shade: [0.1, '#000', true] }, function () {
window.location = "./result.html"; window.location = "./result.html";
});
} else { } else {
layer.msg(data.message, { icon: 2, time: 2500, shade: [0.1, '#000', true] }); layer.msg(data.message, { icon: 2, time: 2500, shade: [0.1, '#000', true] });
} }
} }
}); });
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
}); });

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>成功</title> <title>成功</title>
@ -7,19 +8,35 @@
<link rel="stylesheet" href="./admin/css/other/result.css" /> <link rel="stylesheet" href="./admin/css/other/result.css" />
</head> </head>
<body class="pear-container"> <body class="pear-container">
<div class="layui-card"> <div class="layui-card">
<div class="layui-card-body"> <div class="layui-card-body">
<div class="result"> <div class="result">
<div class="success"> <div class="success">
<svg viewBox="64 64 896 896" data-icon="check-circle" width="80px" height="80px" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path></svg> <svg viewBox="64 64 896 896" data-icon="check-circle" width="80px" height="80px" fill="currentColor"
</div> aria-hidden="true" focusable="false" class="">
<h2 class="title">投票成功!</h2> <path
d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0 0 51.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z">
</path>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z">
</path>
</svg>
</div>
<h2 class="title">投票成功!</h2>
</div>
</div> </div>
</div> </div>
</div> <script src="./component/layui/layui.js"></script>
<script src="./component/layui/layui.js"></script> <script src="./component/pear/pear.js"></script>
<script src="./component/pear/pear.js"></script> <script>
history.pushState(null, null, document.URL);
window.addEventListener("popstate", function (e) {
history.pushState(null, null, document.URL);
}, false);
</script>
</body> </body>
</html>
</html>
Loading…
Cancel
Save