我使用的是Pagination.js。以正常的方式
dataSource: `/ajax/products`,
locator: 'items',
totalNumber: {{ $count }},
pageSize: 2,我想使用post请求。所以我试着使用下面的代码
dataSource: `/ajax/products`,
type: 'post',
data: {
'price' => 200
},但它不起作用。它会显示错误“未捕获SyntaxError:缺失:在属性id之后”。我如何解决我的问题?
发布于 2021-04-01 07:41:18
尝尝这个
dataSource: function () {
$.ajax({
type: 'POST',
url: '/ajax/products',
data: { price: 200},
success: function (response) {
}
});
}注意: pageNumber和pageSize参数不会通过正常方式将其提取到服务器端
https://stackoverflow.com/questions/63105467
复制相似问题