From a1d266888c84511ca257de10121ada5d4bdbeafb Mon Sep 17 00:00:00 2001 From: karasu Date: Mon, 2 Mar 2026 13:21:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(route/ff14):=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E3=80=8C=E5=85=AC=E5=91=8A=E3=80=8D=E6=9D=A1=E7=9B=AE?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98=20(#21261)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route/ff14): 追加「公告」类型编码 * style(ff14): rename type_number to typeNumber for camelCase consistency --- lib/routes/ff14/ff14-zh.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/routes/ff14/ff14-zh.ts b/lib/routes/ff14/ff14-zh.ts index 2cf2f51ff..3ad1007f0 100644 --- a/lib/routes/ff14/ff14-zh.ts +++ b/lib/routes/ff14/ff14-zh.ts @@ -37,17 +37,18 @@ async function handler(ctx) { const referer = 'https://ff.sdo.com/web8/index.html'; const type = ctx.req.param('type') ?? 'all'; - const type_number = { + const typeNumber: Record = { news: '5310', - announce: '5312', + announce: '5312,8324,8325,8326,8327', events: '5311', advertise: '5313', - all: '5310,5312,5311,5313,5309', }; + typeNumber.all = `5309,${Object.values(typeNumber).join(',')}`; + const response = await got({ method: 'get', - url: `http://api.act.sdo.com/UnionNews/List?gameCode=ff&category=${type_number[type]}&pageIndex=0&pageSize=50`, + url: `http://api.act.sdo.com/UnionNews/List?gameCode=ff&category=${typeNumber[type]}&pageIndex=0&pageSize=50`, headers: { Referer: referer, },