diff --git a/apps/Note.js b/apps/Note.js index 8d43f11..b20412d 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -111,13 +111,16 @@ export async function Note(e, { } } for (let val of data.expeditions) { - val.remained_time = new Date().getTime() + val.remained_time * 1000; - let remainedDate = new Date(val.remained_time); - val.remained_time = format("hh:mm", remainedDate); - if (format("dd", remainedDate) != nowDay) { - val.remained_time = `明天 ${val.remained_time}`; - } else { - val.remained_time = ` ${val.remained_time}`; + // console.log(val.remained_time) + if (val.remained_time > 0) { + val.remained_time = new Date().getTime() + val.remained_time * 1000; + let remainedDate = new Date(val.remained_time); + val.remained_time = format("hh:mm", remainedDate); + if (format("dd", remainedDate) != nowDay) { + val.remained_time = `明天 ${val.remained_time}`; + } else { + val.remained_time = ` ${val.remained_time}`; + } } } let remained_time = ""; @@ -178,7 +181,7 @@ export async function Note(e, { for (let val of image) { list_img.push(val) } - var imgs =list_img.length==1?list_img[0]:list_img[lodash.random(0, list_img.length - 1)]; + var imgs = list_img.length == 1 ? list_img[0] : list_img[lodash.random(0, list_img.length - 1)]; return await Common.render("dailyNote/dailyNote", { save_id: uid, uid: uid, diff --git a/components/cfg.json b/components/cfg.json index 877284b..2f94721 100644 --- a/components/cfg.json +++ b/components/cfg.json @@ -1,6 +1,6 @@ { "sys": { - "help": true, + "help": false, "Note": false } } \ No newline at end of file