From 22711ee7b1002c9c94f81c6fd2c5fed10b60677e Mon Sep 17 00:00:00 2001 From: Qian23333 <119576779+Qian23333@users.noreply.github.com> Date: Sat, 16 Aug 2025 07:23:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=85=8D=E7=BD=AE=E5=92=8C=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/manage/remind.js | 5 +++-- apps/remind.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/manage/remind.js b/apps/manage/remind.js index c34923d..d2b40fe 100644 --- a/apps/manage/remind.js +++ b/apps/manage/remind.js @@ -10,7 +10,8 @@ export async function setGlobalRemind() { if (!match) return; const remindTime = match[1]; - // 将全局提醒时间写入yaml配置 - settings.setConfig('remind.globalRemindTime', remindTime); + // 使用 setSingleConfig 更新特定字段 + settings.setSingleConfig('remind', 'globalRemindTime', remindTime); + await this.reply(`全局提醒时间已更新为: ${remindTime}。`); } \ No newline at end of file diff --git a/apps/remind.js b/apps/remind.js index 9165524..0900314 100644 --- a/apps/remind.js +++ b/apps/remind.js @@ -301,7 +301,8 @@ export class Remind extends ZZZPlugin { if (userConfig && userConfig.remindTime) { await this.reply(`当前提醒时间: ${userConfig.remindTime}`); } else { - const globalRemindTime = settings.getConfig('remind.globalRemindTime') || '每日20时'; + const remindConfig = settings.getConfig('remind'); + const globalRemindTime = remindConfig.globalRemindTime || '每日20时'; await this.reply(`个人提醒时间未设置,默认使用全局时间: ${globalRemindTime}`); } }