[更新]修复form搜索时page未重置导致数据不显示的问题 #48

This commit is contained in:
Anyon 2017-09-13 10:18:03 +08:00
parent c8015228ee
commit 39695b0229

View File

@ -30,7 +30,7 @@ define(['jquery', 'admin.plugs'], function () {
/*! 注册 data-serach 表单搜索行为 */
this.$body.on('submit', 'form.form-search', function () {
var url = $(this).attr('action'), split = url.indexOf('?') === -1 ? '?' : '&';
var url = $(this).attr('action').replace(/\&?page\=\d+/g, ''), split = url.indexOf('?') === -1 ? '?' : '&';
if ((this.method || 'get').toLowerCase() === 'get') {
return window.location.href = '#' + $.menu.parseUri(url + split + $(this).serialize());
}