You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
simple-yewu/frontend/views/common/login.php

78 lines
2.6 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>登录 - 汇盈车险业务系统</title>
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/assets/css/animate.css" rel="stylesheet">
<link href="/assets/css/style.css" rel="stylesheet">
<link href="/assets/css/login.css" rel="stylesheet">
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;/ie.html" />
<![endif]-->
<script>
if (window.top !== window.self) {
window.top.location = window.location;
}
</script>
</head>
<body class="signin">
<div class="signinpanel">
<div class="row">
<div class="col-sm-7">
&nbsp;
</div>
<div class="col-sm-5">
<form method="post">
<h2 class="m-t-md text-center">汇盈车险业务系统</h2>
<input type="text" id="username" name="username" class="form-control uname" placeholder="用户名" />
<input type="password" id="password" name="password" class="form-control pword m-b" placeholder="密码" />
<button id="login" class="btn btn-danger btn-block">登录</button>
</form>
</div>
</div>
<div class="signup-footer">
<div class="pull-left">
&copy; 2019 All Rights Reserved. 汇盈百顺
</div>
</div>
</div>
<script src="/assets/js/jquery.min.js?v=2.1.4"></script>
<script src="/assets/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/assets/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
$('#login').on('click', function (event) {
if($('#username').val() == ""){
layer.msg("用户名不能为空!");
return false;
}
if($('#password').val() == ""){
layer.msg("密码不能为空!");
return false;
}
$.ajax({
type: "POST",
url: "/common/login",
data: $("form").serialize(),
dataType: 'json',
success: function (data) {
if (data.code == 200) {
layer.msg(data.msg);
window.location.href = data.data.url;
} else {
//alert("登录失败:" + data.message);
layer.msg(data.msg);
}
}
});
return false;
});
</script>
</body>
</html>