固定类型列表默认全部加载问题

This commit is contained in:
wanggeng888 2021-04-19 12:25:38 +08:00
parent 47afaba8cd
commit c56800c37c

View File

@ -74,14 +74,14 @@
var laydate = layui.laydate; var laydate = layui.laydate;
var common = layui.common; var common = layui.common;
var resizeTimeout = null; var resizeTimeout = null;
var tableUrl = 'api/content/listpage'; var tableUrl = 'api/content/listpage?categoryId={categoryId}';
// 初始化表格 // 初始化表格
function initTable() { function initTable() {
table.render({ table.render({
elem: '#dataTable', elem: '#dataTable',
id: 'dataTable', id: 'dataTable',
url: top.restAjax.path(tableUrl, []), url: top.restAjax.path(tableUrl, [$('#categoryId').val()]),
width: admin.screen() > 1 ? '100%' : '', width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90, height: $win.height() - 90,
limit: 20, limit: 20,
@ -155,12 +155,11 @@
// 重载表格 // 重载表格
function reloadTable(currentPage) { function reloadTable(currentPage) {
table.reload('dataTable', { table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []), url: top.restAjax.path(tableUrl, [$('#categoryId').val()]),
where: { where: {
keywords: $('#keywords').val(), keywords: $('#keywords').val(),
startTime: $('#startTime').val(), startTime: $('#startTime').val(),
endTime: $('#endTime').val(), endTime: $('#endTime').val(),
categoryId: $('#categoryId').val(),
isPublish: $('#isPublish').val() isPublish: $('#isPublish').val()
}, },
page: { page: {