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

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