From 8c7d56c3038856484d5f082f019f9e5d17441531 Mon Sep 17 00:00:00 2001 From: leiyilu <1509167646@qq.com> Date: Wed, 29 Jun 2022 06:51:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Note.js | 16 ++++++++-------- resources/dailyNote/xiaoyao_Note.css | 3 +++ resources/dailyNote/xiaoyao_Note.html | 16 +++++++++------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/apps/Note.js b/apps/Note.js index cdf73e1..3dcc8d1 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -123,8 +123,8 @@ export async function Note(e, { } // console.log(data.expeditions) for (let val of data.expeditions) { - if(val.remained_time<= 0){ - val.percentage=100; + if (val.remained_time <= 0) { + val.percentage = 100; } if (val.remained_time > 0) { // console.log(val.remained_time) @@ -137,17 +137,17 @@ export async function Note(e, { let name = YunzaiApps.mysInfo.roleIdToName(id, true); var time_cha = 20; if (role_user["12"].includes(name)) { - time_cha = 12; + time_cha = 15; } val.percentage = ((val.dq_time / 60 / 60 * 1 / time_cha) * 100 / 10).toFixed(0) * 10; let remainedDate = new Date(val.remained_time); val.remained_time = format("hh:mm", remainedDate); let Time_day = await dateTime_(remainedDate) if (format("dd", remainedDate) != nowDay) { - val.remained_mb2 = "明天"+Time_day + moment(remainedDate).format("hh:mm" ); + val.remained_mb2 = "明天" + Time_day + moment(remainedDate).format("hh:mm"); val.remained_time = `明天 ${val.remained_time}`; } else { - val.remained_mb2 = "今天"+Time_day + moment(remainedDate).format("hh:mm" ); + val.remained_mb2 = "今天" + Time_day + moment(remainedDate).format("hh:mm"); val.remained_time = ` ${val.remained_time}`; } } @@ -213,9 +213,9 @@ export async function Note(e, { } data.transformer.recovery_time = recovery_time; } - let mb=Cfg.get("mb.len", 0)-1; - if(mb<0){ - mb=lodash.random(0,path_url.length-1); + let mb = Cfg.get("mb.len", 0) - 1; + if (mb < 0) { + mb = lodash.random(0, path_url.length - 1); } var image = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/${path_img[mb]}`); var list_img = []; diff --git a/resources/dailyNote/xiaoyao_Note.css b/resources/dailyNote/xiaoyao_Note.css index 93ff9c2..97d6986 100644 --- a/resources/dailyNote/xiaoyao_Note.css +++ b/resources/dailyNote/xiaoyao_Note.css @@ -253,3 +253,6 @@ .jdt { display: inline-flex; } +.red{ + color: red; +} \ No newline at end of file diff --git a/resources/dailyNote/xiaoyao_Note.html b/resources/dailyNote/xiaoyao_Note.html index 652a6c9..b86be1f 100644 --- a/resources/dailyNote/xiaoyao_Note.html +++ b/resources/dailyNote/xiaoyao_Note.html @@ -16,12 +16,14 @@
- 原脆树脂 + 原粹树脂
- {{resinMaxTime_mb2Day}}{{resinMaxTime_mb2}}恢复 -
+ {{if resinMaxTime}} + {{resinMaxTime_mb2Day}}{{resinMaxTime_mb2}}恢复 + {{else}}树脂已完全恢复{{/if}} +
- {{current_resin}}/{{max_resin}} + {{current_resin}}/{{max_resin}}
@@ -29,7 +31,7 @@
- 洞庭宝钱 + 洞天宝钱
{{coinTime_mb2Day}}{{coinTime_mb2}}恢复
@@ -49,7 +51,7 @@ 今日委托奖励{{if is_extra_task_reward_received==1}}已{{else}}未{{/if}}领取
- {{finished_task_num}}/{{total_task_num}} + {{finished_task_num}}/{{total_task_num}}
@@ -62,7 +64,7 @@ 本周剩余消耗减半次数
- {{3-remain_resin_discount_num}}/{{resin_discount_num_limit}} + {{3-remain_resin_discount_num}}/{{resin_discount_num_limit}}