enhance performance of login captcha

This commit is contained in:
printempw 2016-07-29 11:14:06 +08:00
parent 77d1000070
commit 48ebec183f

View File

@ -2,7 +2,7 @@
* @Author: printempw
* @Date: 2016-07-17 10:54:22
* @Last Modified by: printempw
* @Last Modified time: 2016-07-28 15:44:31
* @Last Modified time: 2016-07-29 11:10:21
*/
'use strict';
@ -42,6 +42,7 @@ $('#login-button').click(function() {
if (data.captcha == "") {
showMsg('你还没有填写验证码哦');
$('#captcha').focus();
return false;
}
}
@ -71,6 +72,10 @@ $('#login-button').click(function() {
freshCaptcha();
}
if ($('#captcha-form').css('display') == "block") {
freshCaptcha();
}
showMsg(json.msg, 'warning');
$('#login-button').html('登录').prop('disabled', '');
}