|
|
@ -322,16 +322,20 @@ |
|
|
let totalCount = 0; |
|
|
let totalCount = 0; |
|
|
let totalPages = 0; |
|
|
let totalPages = 0; |
|
|
|
|
|
|
|
|
|
|
|
// URL获取的id参数 |
|
|
|
|
|
let landingId = ''; |
|
|
|
|
|
|
|
|
// 初始化页面:从URL获取页码,请求后端数据 |
|
|
// 初始化页面:从URL获取页码,请求后端数据 |
|
|
async function initPage() { |
|
|
async function initPage() { |
|
|
// 从URL参数获取当前页码(如 ?page=2) |
|
|
|
|
|
const urlParams = new URLSearchParams(window.location.search); |
|
|
const urlParams = new URLSearchParams(window.location.search); |
|
|
const pageParam = urlParams.get('page'); |
|
|
|
|
|
if (pageParam && !isNaN(pageParam)) { |
|
|
|
|
|
currentPage = parseInt(pageParam); |
|
|
|
|
|
|
|
|
landingId = urlParams.get('id'); |
|
|
|
|
|
|
|
|
|
|
|
if (!landingId) { |
|
|
|
|
|
renderEmptyState('缺少必要的参数'); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 从后端请求数据(替换模拟数据) |
|
|
|
|
|
|
|
|
// 从后端请求数据 |
|
|
await fetchDataFromBackend(); |
|
|
await fetchDataFromBackend(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -351,6 +355,7 @@ |
|
|
try { |
|
|
try { |
|
|
// 1. 构造请求参数(分页+查询条件) |
|
|
// 1. 构造请求参数(分页+查询条件) |
|
|
const requestParams = { |
|
|
const requestParams = { |
|
|
|
|
|
id: landingId, |
|
|
page: currentPage, // 当前页码 |
|
|
page: currentPage, // 当前页码 |
|
|
size: pageSize, // 每页条数 |
|
|
size: pageSize, // 每页条数 |
|
|
startTime: startTimeInput.value || '', // 开始时间(查询条件) |
|
|
startTime: startTimeInput.value || '', // 开始时间(查询条件) |
|
|
|