From b2de82dbf56cfc9d8194bdbfb3dea2e3a6d1a550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E5=8F=88?= <104784428+guyou45@users.noreply.github.com> Date: Fri, 16 Jan 2026 22:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20(#2696)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修改参数逻辑 * 修改逻辑,添加数字过滤 --- repo/js/ABGIHoui/README.md | 2 +- repo/js/ABGIHoui/main.js | 7 ++++--- repo/js/ABGIHoui/manifest.json | 2 +- repo/js/ABGIHoui/settings.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/repo/js/ABGIHoui/README.md b/repo/js/ABGIHoui/README.md index 15fd97a9b..3f7d2f7b0 100644 --- a/repo/js/ABGIHoui/README.md +++ b/repo/js/ABGIHoui/README.md @@ -21,7 +21,7 @@ "启动bat脚本",[参数为:bat脚本路径,Ps:【E:\ABGI\重启.bat】] "联机更换ABGI的账号信息",[参数为:uid-name,Ps:【1*******-原神大王】] "更换联机房间",[参数为:房间名字+vip密钥,Ps:【古叉别断网-GUYOUSHIGEHAOREN】] - "等待时间" + "等待时间",[参数为:多少秒,Ps:【5000】] ------ diff --git a/repo/js/ABGIHoui/main.js b/repo/js/ABGIHoui/main.js index e6fd62578..bacb0dff3 100644 --- a/repo/js/ABGIHoui/main.js +++ b/repo/js/ABGIHoui/main.js @@ -1,5 +1,5 @@ // 延时时间 -const outTime= ~~settings.outTime; +const outTime= ~~String(settings.outTime).replace(/\D/g, ""); // 比较结果 let result = 0 @@ -125,8 +125,9 @@ async function compareVersion(version1, version2) { log.info(`ABGI启动更换房间:`+`${settings.inputText}`); await sleep(outTime); return; - case "等待时间(单位为ms)": - await sleep(500); + case "等待时间(单位为秒)": + const pureDigitStr = String(settings.inputText).replace(/\D/g, ""); + await sleep(pureDigitStr*1000); await sleep(outTime); return; default: diff --git a/repo/js/ABGIHoui/manifest.json b/repo/js/ABGIHoui/manifest.json index 22690ab8d..6d16a52c1 100644 --- a/repo/js/ABGIHoui/manifest.json +++ b/repo/js/ABGIHoui/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "老王妙妙屋", - "version": "0.8", + "version": "0.9", "tags": [ "abgi" ], diff --git a/repo/js/ABGIHoui/settings.json b/repo/js/ABGIHoui/settings.json index b0751a441..d58df29bb 100644 --- a/repo/js/ABGIHoui/settings.json +++ b/repo/js/ABGIHoui/settings.json @@ -21,7 +21,7 @@ "bat脚本", "联机更换ABGI的账号信息", "更换联机房间", - "等待时间(单位为ms)" + "等待时间(单位为秒)" ], "default": "" },