Commit 18d2a083 authored by 吴春's avatar 吴春

最后登录信息

parent 1bf8b70b
Pipeline #20 canceled with stages
......@@ -16,7 +16,11 @@
<meta name="description" content="芙蓉国粹" />
<link href="/Areas/TicketMall/Content/css/public.css" rel="stylesheet" />
<link href="/Areas/TicketMall/Content/css/main.css" rel="stylesheet" />
<script src="/Areas/TicketMall/Content/js/jquery.min.js"></script>
<script src="/Scripts/jquery.form.min.js"></script>
<script type="text/javascript" src="/Areas/TicketMall/Content/js/jquery.ui.js"></script>
<script src="/Areas/TicketMall/Content/js/layer/layer.js"></script>
<script src="/Areas/TicketMall/Content/layui/layui.js"></script>
</head>
<body>
......@@ -33,7 +37,7 @@
<h2>欢迎登录芙蓉国粹</h2>
<span>没有账号请联系客服</span>
</div>
<form id="form-login" name="post" action="">
<div id="form-login">
<ul>
<li>
<input type="text" id="userid" name="userid" placeholder="请输入账户名" value="">
......@@ -45,42 +49,46 @@
</div>
</li>
</ul>
<a class="btn_Login" onclick="Login()">登 录</a>
<button class="btn_Login" onclick="Login()">登 录</button>
</form>
</div>
</div>
</div>
<script src="/Areas/TicketMall/Content/js/jquery.min.js"></script>
<script type="text/javascript">
function Login() {
var uname = $("#userid").val();
if (uname == "") {
alert("请输入账户名");
layer.msg('请输入账户名');
return;
}
var pwd = $("#pwd").val();
if (pwd == "") {
alert("请输入密码");
layer.msg('请输入密码');
return;
}
$.ajax({
type: "post",
url: "@Url.Action("Index")",
data: { "uname": uname, "pwd": pwd },
dataType: "json",
async:"false",
success: function (data) {
if (data == "1") {
alert("账号或密码不正确");
return;
} else if (data == "2") {
alert("账号已被禁用,禁止登陆");
return;
} else {
location.href = "/TicketMall/Home";
if (data.valid) {
layer.msg(data.message, {
icon: 1,//提示的样式
end: function () {
location.href = "/TicketMall/Home";
}
});
}
else {
layer.msg(data.message, { icon: 2 });
}
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment