任务:连续登录

This commit is contained in:
luying
2022-05-18 17:13:28 +08:00
parent 164a8bd492
commit e3b9d0d5c2

View File

@@ -345,10 +345,12 @@ export class CheckSingleTask {
let records = await getRecord();
let today = `${getZeroPoint()}`;
let yesterday = `${getZeroPoint() - 24 * 60 * 60}`
if (records.indexOf(yesterday) == -1) {
result = { set: 1, records: [...records, today] }
} else {
result = { inc: 1, records: [...records, today] }
if (records.indexOf(today) == -1) {
if (records.indexOf(yesterday) == -1) {
result = { set: 1, records: [...records, today] }
} else {
result = { inc: 1, records: [...records, today] }
}
}
break;
}