From 16ff7380a5ca4baaaa956d17fbd350bcf5e485a2 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 1 Feb 2023 12:14:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B7=A8=E6=9C=88=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/pages/manage/setting/checkin.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/pages/manage/setting/checkin.vue b/resources/assets/js/pages/manage/setting/checkin.vue index ec72c6654..38742ea2e 100644 --- a/resources/assets/js/pages/manage/setting/checkin.vue +++ b/resources/assets/js/pages/manage/setting/checkin.vue @@ -173,11 +173,14 @@ export default { latelyFormat(data) { const time = $A.Time(); + const Ym = $A.formatDate("Ym", time) this.latelyData = []; for (let i = 0; i < 5; i++) { - const ymd = $A.formatDate("Y-m-d", time - i * 86400) - const item = data.find(({date}) => date == ymd) || {date: ymd, section: []} - this.latelyData.push(item) + if (Ym == $A.formatDate("Ym", time - i * 86400)) { + const ymd = $A.formatDate("Y-m-d", time - i * 86400) + const item = data.find(({date}) => date == ymd) || {date: ymd, section: []} + this.latelyData.push(item) + } } },