商城:修复会员统计时间范围选择昨天时, 会强制查询两天的问题

This commit is contained in:
owen
2023-11-24 20:54:47 +08:00
parent 253401ace3
commit c3cad3f3ee
3 changed files with 13 additions and 6 deletions

View File

@ -335,5 +335,8 @@ export function getDateRange(
beginDate: dayjs.ConfigType,
endDate: dayjs.ConfigType
): [string, string] {
return [dayjs(beginDate).startOf('d').toString(), dayjs(endDate).endOf('d').toString()]
return [
dayjs(beginDate).startOf('d').format('YYYY-MM-DD HH:mm:ss'),
dayjs(endDate).endOf('d').format('YYYY-MM-DD HH:mm:ss')
]
}