diff --git a/public/static/admin.js b/public/static/admin.js index e2dcb3d4d..c016d4256 100644 --- a/public/static/admin.js +++ b/public/static/admin.js @@ -353,9 +353,8 @@ $(function () { /*! 注册对象到Jq */ $.vali = function (form, callback, options) { return (new function (that) { - that = this; // 表单元素 - this.tags = 'input,textarea,select'; + that = this, this.tags = 'input,textarea,select'; // 检测元素事件 this.checkEvent = {change: true, blur: true, keyup: false}; // 去除字符串两头的空格 diff --git a/public/static/login.js b/public/static/login.js index 66f9f309f..8cb3809eb 100644 --- a/public/static/login.js +++ b/public/static/login.js @@ -17,8 +17,7 @@ $(function () { /*! 后台加密登录处理 */ $body.find('[data-login-form]').map(function (that) { - that = this; - require(["md5"], function (md5) { + (that = this), require(["md5"], function (md5) { $("form").vali(function (data) { data['password'] = md5.hash(md5.hash(data['password']) + data['uniqid']); $.form.load(location.href, data, "post", function (ret) { @@ -51,7 +50,7 @@ $(function () { /*! 初始化登录图形 */ $('[data-captcha]').map(function () { - $(this).trigger('click') + $(this).trigger('click'); }); }); \ No newline at end of file