代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>科讯Muisc-登录</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<style>
body {
overflow: hidden;
}
.bg {
background-image: url(img/timg.jpg);
background-repeat: no-repeat;
background-size: 100% 130%;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
filter: blur(20px);
}
.login {
height: 400px;
width: 600px;
border-radius: 8px;
background-color: rgba(255, 255, 255, 0.3);
position: fixed;
margin: auto;
left: 30%;
top: 10%;
/*box-shadow: 0 0 10px 1px #E3E3E3 inset;*/
}
.title {
height: 100px;
line-height: 100px;
text-align: center;
color: white;
}
.input {
height: 50px;
width: 500px;
border: 1px solid white;
border-radius: 50px;
margin: auto;
margin-bottom: 40px;
}
.submit {
height: 40px;
width: 300px;
background-color: royalblue;
line-height: 40px;
border-radius: 50px;
text-align: center;
color: white;
margin: auto;
cursor: pointer;
}
.submit:hover {
opacity: 0.9;
}
.ico {
height: 100%;
width: 50px;
line-height: 50px;
text-align: center;
color: white;
font-size: 20px;
float: left;
}
.input-in {
height: 100%;
width: 420px;
float: left;
}
.input-in input {
border: none;
background: transparent;
width: 100%;
height: 100%;
color: white;
}
</style>
</head>
<body>
<div class="bg">
</div>
<div class="login">
<form>
<h3 class="title">用户登录</h3>
<div class="input">
<div class="ico glyphicon glyphicon-user"></div>
<div class="input-in">
<input type="text" maxlength="16" placeholder="输入用户名" id="mgName" />
</div>
<span style="color:white; margin-left: 30px;" id="mgNameError"></span>
</div>
<div class="input">
<div class="ico glyphicon glyphicon-lock"></div>
<div class="input-in">
<input type="password" maxlength="16" placeholder="输入密码" id="mgPassword" />
</div>
<span style="color:white; margin-left: 30px;" id="mgPasswordError"></span>
<p style="text-align: right;"><a style="color: white;" href="reg.html">没有账号,去注册</a></p>
</div>
<div class="submit" id="submit">登录</div>
</form>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/config.js" ></script>
<script>
$("#submit").click(function() {
var userName = $("#mgName").val().trim();
var password = $("#mgPassword").val().trim();
if(userName.length <= 0) {
$("#mgNameError").text("用户名不能为空");
return;
} else {
$("#mgNameError").text("");
}
if(password.length <= 0) {
$("#mgPasswordError").text("密码不能为空");
return;
} else {
$("#mgPasswordError").text("");
}
$.post(serverLocation+"/kexunMusic/userLogin", {
"uName": userName,
"uPassword": password
}, function(data) {
if(data.message == "ok") {
var userInfo = JSON.stringify(data.userInfo)
window.localStorage.setItem("userInfo", userInfo);
window.location.href = "index.html";
} else {
$("#mgPasswordError").text("账号或密码错误");
}
});
});
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。