增加销售数据时间戳

This commit is contained in:
speakeloudest 2026-02-09 06:09:49 +02:00
parent cc9f0298f7
commit 5e4354d654

View File

@ -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) {