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

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

@ -74,11 +74,6 @@ const emits = defineEmits<{
}>()
/** 触发时间范围选中事件 */
const emitDateRangePicker = async () => {
// 开始与截止在同一天的, 折线图出不来, 需要延长一天
if (DateUtil.isSameDay(times.value[0], times.value[1])) {
// 前天
times.value[0] = DateUtil.formatDate(dayjs(times.value[0]).subtract(1, 'd'))
}
emits('change', times.value)
}