diff --git a/repo/js/AutoCode/codes.txt b/repo/js/AutoCode/codes.txt index e10ff3d57..ae67eb104 100644 --- a/repo/js/AutoCode/codes.txt +++ b/repo/js/AutoCode/codes.txt @@ -1,16 +1,4 @@ -SY2Y3FHHGKTE,2025.10.20 00:00:00 -AY2Y3WZGY3TJ,2025.10.20 00:00:00 -VYKGJWZHY2AN,2025.10.20 00:00:00 -CY2H2XHYZKCS,2025.10.20 00:00:00 -NG3ZJXHYG3CW,2025.10.20 00:00:00 -NG2Z3EHYYKVJ,2025.10.20 00:00:00 -原神5周年快乐,2025.11.1 00:00:00 -原神奈芙尔月之二上线,2025.10.13 12:00:00 -月之二再战猎月人,2025.10.13 12:00:00 -我现在就要玩千星奇域,2025.10.13 12:00:00 -祈月之夜快乐,2025.11.24 12:00:00 -小杜林大冒险,2025.11.24 12:00:00 -人气奇匠为你献上,2025.11.24 12:00:00 -赴原神之约伴月同眠,2026.03.01 12:00:00 -回家的路原神相伴,2026.03.01 12:00:00 +如果在冬夜一个旅人,2026.01.05 12:00:00 +海灯节快乐,2026.01.05 12:00:00 +兑换码兑换马,2026.01.05 12:00:00 diff --git a/repo/js/AutoCode/main.js b/repo/js/AutoCode/main.js index 649f0dee7..b5d67d77c 100644 --- a/repo/js/AutoCode/main.js +++ b/repo/js/AutoCode/main.js @@ -44,7 +44,11 @@ async function* getCodeFromBGI() { log.error(`获取BGI兑换码列表失败: 服务器返回状态${listResp.status} ${listResp.statusText}`); return; } - const listJson = JSON.parse(listResp.body); + const fixed = listResp.body + .replace(/,\s*]/g, ']') + .replace(/,\s*}/g, '}'); + + const listJson = JSON.parse(fixed); if (!Array.isArray(listJson)) { log.error(`BGI兑换码列表格式错误`); return; diff --git a/repo/js/AutoCode/manifest.json b/repo/js/AutoCode/manifest.json index 98f642f7a..6db748386 100644 --- a/repo/js/AutoCode/manifest.json +++ b/repo/js/AutoCode/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "自动使用兑换码", - "version": "6.2.0", + "version": "6.4.0", "bgi_version": "0.54.0", "description": "仅支持国服", "authors": [ diff --git a/repo/js/AutoCode/settings.json b/repo/js/AutoCode/settings.json index aeaec1ddf..8cc6ffd07 100644 --- a/repo/js/AutoCode/settings.json +++ b/repo/js/AutoCode/settings.json @@ -1,13 +1,13 @@ -[ - { - "name": "username", - "type": "input-text", - "label": "账户名称\n用于多账户运行时区分不同账户", - "default": "默认账户" - }, - { - "name": "use_bgi_code_source", - "type": "checkbox", - "label": "使用BGI提供的兑换码列表" - } +[ + { + "name": "username", + "type": "input-text", + "label": "账户名称\n用于多账户运行时区分不同账户", + "default": "默认账户" + }, + { + "name": "use_bgi_code_source", + "type": "checkbox", + "label": "使用BGI提供的兑换码列表" + } ] \ No newline at end of file