From 8ac80b998817cabd4a34272c4a2823b3649b95df Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 20 Jan 2026 12:17:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(core):=20=E6=B7=BB=E5=8A=A0=E6=8C=89UID?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E8=BF=90=E8=A1=8C=E8=AE=B0=E5=BD=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 实现了按UID过滤清空记录的功能 - 在设置中添加了清空运行记录模式选择选项 - 新增"全部"和"UID"两种清空模式 - 当选择UID模式时只清空当前UID对应的记录 - 添加了相应的日志输出显示清空的UID信息 - 更新了配置文件中的设置项定义 --- repo/js/FullyAutoAndSemiAutoTools/config/settings.json | 10 ++++++++++ repo/js/FullyAutoAndSemiAutoTools/main.js | 10 +++++++++- repo/js/FullyAutoAndSemiAutoTools/settings.json | 10 ++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/repo/js/FullyAutoAndSemiAutoTools/config/settings.json b/repo/js/FullyAutoAndSemiAutoTools/config/settings.json index af26405d5..2389cb2be 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/config/settings.json +++ b/repo/js/FullyAutoAndSemiAutoTools/config/settings.json @@ -34,6 +34,16 @@ "label": "配置模式-刷新-清空运行记录", "default": false }, + { + "name": "refresh_record_mode", + "type": "select", + "label": "清空运行记录模式", + "options": [ + "全部", + "UID" + ], + "default": "UID" + }, { "name": "loading_level", "type": "input-text", diff --git a/repo/js/FullyAutoAndSemiAutoTools/main.js b/repo/js/FullyAutoAndSemiAutoTools/main.js index 6d20bb7ff..8f21ed86d 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/main.js +++ b/repo/js/FullyAutoAndSemiAutoTools/main.js @@ -398,9 +398,17 @@ async function initRefresh(settingsConfig) { log.error("[PATH] 保存 PATH_JSON_LIST 失败: {0}", e.message); } if (settings.refresh_record) { + if (settings.refresh_record_mode === "UID") { + RecordList=RecordList.filter(item => item.uid !== Record.uid) + RecordPathList=RecordPathList.filter(item => item.uid !== Record.uid) + file.writeTextSync(json_path_name.RecordPathText, JSON.stringify(RecordPathList)) + file.writeTextSync(json_path_name.RecordText, JSON.stringify(RecordList)) + log.info("已清空UID:{0}记录文件",Record.uid) + return + } file.writeTextSync(json_path_name.RecordPathText, JSON.stringify([])) file.writeTextSync(json_path_name.RecordText, JSON.stringify([])) - log.info("已清空记录文件") + log.info("已清空全部记录文件") } } diff --git a/repo/js/FullyAutoAndSemiAutoTools/settings.json b/repo/js/FullyAutoAndSemiAutoTools/settings.json index af26405d5..2389cb2be 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/settings.json +++ b/repo/js/FullyAutoAndSemiAutoTools/settings.json @@ -34,6 +34,16 @@ "label": "配置模式-刷新-清空运行记录", "default": false }, + { + "name": "refresh_record_mode", + "type": "select", + "label": "清空运行记录模式", + "options": [ + "全部", + "UID" + ], + "default": "UID" + }, { "name": "loading_level", "type": "input-text",