From 43d28b37743043046b849cedfdb49f1f8d61ec46 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 28 七月 2020 09:24:50 +0800 Subject: [PATCH] #当前本版十分完美、冻结 --- src/main/webapp/views/pda/login.html | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/views/pda/login.html b/src/main/webapp/views/pda/login.html index f13bc38..4aa73f5 100644 --- a/src/main/webapp/views/pda/login.html +++ b/src/main/webapp/views/pda/login.html @@ -105,12 +105,14 @@ form.on('submit(login)', function (data) { var mobile = $("#mobile").val(); if (mobile === "") { - alert("璇疯緭鍏ヨ处鍙�"); + layer.msg("璇疯緭鍏ヨ处鍙�", {icon: 2}) + $("#mobile").focus(); return; } var password = $("#password").val(); if (password === "") { - alert("璇疯緭鍏ュ瘑鐮�"); + layer.msg("璇疯緭鍏ュ瘑鐮�", {icon: 2}) + $("#password").focus(); return; } @@ -124,11 +126,12 @@ method: 'POST', success: function (res) { if (res.code === 200){ + layer.msg("鐧诲綍鎴愬姛", {icon: 1}) localStorage.setItem("token", res.data.token); localStorage.setItem("username", res.data.username); window.location.href = "index.html"; } else { - alert(res.msg); + layer.msg(res.msg, {icon: 2}) } } }); @@ -138,6 +141,8 @@ $('body').keydown(function () { if (event.keyCode === 13) { $("#login-button").click(); + } else if (event.keyCode === 115) { + $("#login-button").click(); } }); -- Gitblit v1.9.1