From 5e4354d654a395beb0e3ab99e1ee39e9b1f2b9cf Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Mon, 9 Feb 2026 06:09:49 +0200 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=80=E5=94=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UserCenter/components/SalesData/index.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/UserCenter/components/SalesData/index.vue b/src/pages/UserCenter/components/SalesData/index.vue index 744ccda..8366c5d 100644 --- a/src/pages/UserCenter/components/SalesData/index.vue +++ b/src/pages/UserCenter/components/SalesData/index.vue @@ -59,9 +59,20 @@ const loading = ref(false) async function fetchSales() { loading.value = true try { + const now = new Date() + // 2. 获取当月 1 号 0 点 0 分 0 秒 + const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1, 0, 0, 0) + const start_time = Math.floor(startOfMonth.getTime() / 1000) + + // 3. 获取下个月的第 0 天(即本月的最后一天)的 23:59:59 + const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59) + const end_time = Math.floor(endOfMonth.getTime() / 1000) const res: any = await request.get('/api/v1/public/user/invite/sales', { page: 1, size: 8, + // start_time=1704038400&end_time=1706716799 + start_time, + end_time, }) salesPage.value = res } catch (error) {