From 24f60e86466a9f3d1ddbe36244c6708a3e1c260d Mon Sep 17 00:00:00 2001 From: yziiy <15979918+mayday-yziiy@user.noreply.gitee.com> Date: Fri, 24 Oct 2025 09:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A4=BC=E7=89=A9=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=97=E8=A1=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Statistical/giftRecord/hook.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/Statistical/giftRecord/hook.tsx b/src/views/Statistical/giftRecord/hook.tsx index 683399a..332aa4b 100644 --- a/src/views/Statistical/giftRecord/hook.tsx +++ b/src/views/Statistical/giftRecord/hook.tsx @@ -17,10 +17,7 @@ export function useData() { currentPage: 1, background: true }); - const statisticsList = ref([ - { label: "礼物总数量", prop: "gift_num" }, - { label: "礼物总价", prop: "total_price" } - ]) + const statisticsList = ref() const totalData = ref(null) const searchForm = ref({ @@ -49,7 +46,8 @@ export function useData() { { label: "开始时间", prop: "start_time", type: "date" }, { label: "结束时间", prop: "end_time", type: "date" }, ]); - const tableLabel = ref([ + const tableLabel = ref([]) + const tableLabelS = ref([ { label: "送礼人ID-昵称", prop: "send_user" @@ -128,7 +126,11 @@ export function useData() { prop: "room_owner_earning" } ] - statisticsList.value = [...statisticsList.value, ...objStatistics] + statisticsList.value = [...[ + { label: "礼物总数量", prop: "gift_num" }, + { label: "礼物总价", prop: "total_price" } + ], ...objStatistics] + tableLabel.value = [...tableLabelS.value] tableLabel.value.splice(7, 0, ...objLabel) console.log(tableLabel.value) tableList.value = data.lists.map(ele => { @@ -143,7 +145,7 @@ export function useData() { totalData.value = data.total; pagination.value.total = data.count; - pagination.value.currentPage = data.page; + pagination.value.currentPage = parseFloat(data.page); } loading.value = false; }; @@ -153,7 +155,7 @@ export function useData() { }; const handleCurrentChange = (val: number) => { pagination.value.currentPage = val; - console.log(searchForm.value, 'yzy') + // console.log(searchForm.value, 'yzy') onSearch(searchForm.value); }; const exportFormRef = ref(null)