diff --git a/plugins/genshin/model/note.js b/plugins/genshin/model/note.js index 33e4696..3664249 100644 --- a/plugins/genshin/model/note.js +++ b/plugins/genshin/model/note.js @@ -69,6 +69,20 @@ export default class Note extends base { } else if (seconds > 0) { resinMaxTime = seconds + '秒' } + if ((day > 0) || (hours > 0) || (seconds > 0)) { + let total_seconds = 3600*hours + 60*minutes + seconds + const now = new Date() + const dateTimes = now.getTime() + total_seconds * 1000 + const date = new Date(dateTimes) + const dayDiff = date.getDate() - now.getDate() + const str = dayDiff === 0 ? '今日' : '明日' + const timeStr = `${date.getHours().toString().padStart(2, '0')}:${date + .getMinutes() + .toString() + .padStart(2, '0')}` + let recoverTimeStr = ` | [${str}]${timeStr}` + resinMaxTime += recoverTimeStr + } } data.bfStamina = data.current_stamina / data.max_stamina * 100 + '%' /** 派遣 */ diff --git a/plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html b/plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html index 2450081..20b87b7 100644 --- a/plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html +++ b/plugins/genshin/resources/StarRail/html/dailyNote/dailyNote.html @@ -31,7 +31,7 @@
{{if stamina_recover_time>0}} - 剩余恢复时间:{{resinMaxTime}} + 剩余:{{resinMaxTime}} {{else}} 开拓力已完全恢复 {{/if}} @@ -69,4 +69,4 @@
- \ No newline at end of file +