This commit is contained in:
777
2025-08-21 01:14:58 +08:00
parent 2bbe0dc983
commit 3c41f0e222

View File

@@ -126,7 +126,7 @@ export default {
pageSize: 10, pageSize: 10,
mobile: undefined, mobile: undefined,
usercode: undefined, usercode: undefined,
countDate: new Date(), countDate: this.getYesterdayFormatted(),
}, },
}; };
}, },
@@ -134,6 +134,17 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getYesterdayFormatted() {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1); // 日期减1天
const year = yesterday.getFullYear();
// 月份和日期需要补零处理
const month = String(yesterday.getMonth() + 1).padStart(2, '0');
const day = String(yesterday.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
/** 查询每日发言统计列表 */ /** 查询每日发言统计列表 */
getList() { getList() {
this.loading = true; this.loading = true;