add
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
<script type="text/javascript" src="/static/handle/js/jquery-2.1.0.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<input type="text" value="" id="username"><br>
|
||||
<input type="text" value="" id="password"><br>
|
||||
<button onclick="login()">登录</button>
|
||||
<script type="text/javascript">
|
||||
function login(){
|
||||
var query = new Object();
|
||||
query.username = $('#username').val();
|
||||
query.password = $('#password').val();
|
||||
$.ajax({
|
||||
url:'/login/dologin',
|
||||
data:query,
|
||||
dataType:"json",
|
||||
type:"POST",
|
||||
success:function(data){
|
||||
if(data.code === 1){
|
||||
window.location.href=data.url;
|
||||
}else{
|
||||
alert(data.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user