提交 0a9e4a25 编写于 作者: shuzheng5201314's avatar shuzheng5201314

同步判断结果码,增加记住密码选项

上级 d7336264
......@@ -37,7 +37,7 @@
</div>
<div class="checkbox">
<label>
<input id="rememberme" type="checkbox" name="rememberme">
<input id="rememberMe" type="checkbox" name="rememberMe">
<i class="input-helper"></i>
自动登录
</label>
......@@ -70,30 +70,23 @@
data: {
username: $('#username').val(),
password: $('#password').val(),
rememberme: $('#rememberme').val(),
rememberMe: $('#rememberMe').is(':checked'),
backurl: '${param.backurl}'
},
beforeSend: function() {
},
success: function(json){
if (json.result) {
if (json.code == 1) {
location.href = json.data;
} else {
if (10001 == json.data) {
alert("帐号不能为空!");
alert(json.data);
if (10101 == json.code) {
$('#username').focus();
}
if (10002 == json.data) {
alert("密码不能为空!");
if (10102 == json.code) {
$('#password').focus();
}
if (10004 == json.data) {
alert("该帐号不存在!");
}
if (10005 == json.data) {
alert("密码错误!");
}
if (10006 == json.data) {
alert("帐号被封!");
}
}
},
error: function(error){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册