增加销售数据时间戳
This commit is contained in:
parent
cc9f0298f7
commit
5e4354d654
@ -59,9 +59,20 @@ const loading = ref(false)
|
|||||||
async function fetchSales() {
|
async function fetchSales() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
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', {
|
const res: any = await request.get('/api/v1/public/user/invite/sales', {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 8,
|
size: 8,
|
||||||
|
// start_time=1704038400&end_time=1706716799
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
})
|
})
|
||||||
salesPage.value = res
|
salesPage.value = res
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user