mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-02 23:27:04 +00:00
fix: 跨月签到记录不显示的问题
This commit is contained in:
parent
7109eb0238
commit
16ff7380a5
@ -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)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user