<!DOCTYPE html>
<html>
	<head>
		<link href="/static/admin/css/login.css" rel="stylesheet" />
	</head>
	 
	<body>
		<div class="main">
			<div class="hd">deituiCMS</div>
			<form autocomplete="off">
				<div class="flex">
					<div class="w80">账号</div>
					<div class="flex-1">
						<input type="text" id="username" />
					</div>
				</div>
				<div class="flex">
					<div class="w80">密码</div>
					<div class="flex-1">
						<input type="password" id="password" />
					</div>
				</div>
				<div class="flex">
					<div class="w80"></div>
					<div class="flex-1">
						<div class="btn-row-submit" id="loginSubmit">登录</div>
					</div>	
				</div>	
				
			</form>
		</div>
		<script src="/plugin/jquery/jquery-2.1.3.min.js"></script>
		<script>
			$(document).on("click","#loginSubmit",function(){
				var username=$("#username").val();
				var password=$("#password").val();
				$.post("/admin.php?m=login&a=login_save&ajax=1",{
					username:username,
					password:password
				},function(res){
					if(res.error){
						alert(res.message);
					}else{
						window.location="/admin.php";
					}
				},"json")
			})
			
		</script>
	</body>	
</html>