Compare commits

...

2 Commits

Author SHA1 Message Date
Anyon
4ae7d3484f Update admin.js 2022-04-14 12:18:23 +08:00
Anyon
0b51e430d0 Update login.js 2022-04-14 10:31:10 +08:00
2 changed files with 6 additions and 6 deletions

View File

@ -867,7 +867,7 @@ $(function () {
var url = $(this).attr('action').replace(/&?page=\d+/g, '');
if ((this.method || 'get').toLowerCase() === 'get') {
var split = url.indexOf('?') > -1 ? '&' : '?', stype = location.href.indexOf('spm=') > -1 ? '#' : '';
return location.href = stype + $.menu.parseUri(url + split + $(this).serialize());
return location.href = stype + $.menu.parseUri(url + split + $(this).serialize().replace(/\+/g, ' '));
}
return $.form.load(url, this, 'post');
});

View File

@ -17,14 +17,14 @@ $(function () {
window.$body = $('body');
/*! 后台加密登录处理 */
$body.find('[data-login-form]').map(function (that) {
(that = this), require(["md5"], function (md5) {
$("form").vali(function (data) {
$body.find('form[data-login-form]').each(function (idx, form) {
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) {
if (parseInt(ret.code) !== 1) {
$(that).find('[data-captcha]').trigger('click');
$(that).find('.verify.layui-hide').removeClass('layui-hide');
$(form).find('[data-captcha]').trigger('click');
$(form).find('.verify.layui-hide').removeClass('layui-hide');
}
}, null, null, 'false');
});