购物车历史订单增加,代码优化

This commit is contained in:
GaoHao
2025-04-02 09:20:26 +08:00
parent 5a655ba09e
commit 5e6646b574
31 changed files with 418 additions and 357 deletions

View File

@@ -27,4 +27,11 @@ export function getThisMonthTimestamps() {
const end = dayjs().endOf('month').format('YYYY-MM-DD HH:mm:ss');
return { start, end ,label:'本月'};
}
// 获取上个月的开始和结束时间
export function getThisLastMonthTimestamps() {
const start = dayjs().subtract(1, 'month').startOf('month').format('YYYY-MM-DD HH:mm:ss');
const end = dayjs().subtract(1, 'month').endOf('month').format('YYYY-MM-DD HH:mm:ss');
return { start, end ,label:'上月'};
}