From 61a8ae0fc990de08708de2e19c7be3c6ec900966 Mon Sep 17 00:00:00 2001 From: dy Date: Sun, 31 Dec 2023 17:04:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E9=BB=91=E5=B8=AE=E4=BA=89=E9=9C=B8?= =?UTF-8?q?=E5=8F=96=E5=8F=82=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hbzb/jfs/ApiOpen.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/hbzb/jfs/ApiOpen.ts b/src/api_s2c/hbzb/jfs/ApiOpen.ts index bf7901e..fb732fb 100644 --- a/src/api_s2c/hbzb/jfs/ApiOpen.ts +++ b/src/api_s2c/hbzb/jfs/ApiOpen.ts @@ -29,7 +29,7 @@ export default async function (call: ApiCall) { //todo 健壮性处理 return call.errorCode(-4) } - if (callRes.res.enemy.length) + if (callRes.res?.enemy?.length) data.enemy = callRes.res.enemy.map(e => { return {...e, result: null}; }); From 64a9ea73604f588524d6f15e36bc212fa474e80c Mon Sep 17 00:00:00 2001 From: dy Date: Sun, 31 Dec 2023 17:22:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix=20=E9=BB=91=E5=B8=AE=E4=BA=89=E9=9C=B8?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=BA=E7=A9=BA=E6=97=B6=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hbzb/jfs/ApiOpen.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api_s2c/hbzb/jfs/ApiOpen.ts b/src/api_s2c/hbzb/jfs/ApiOpen.ts index fb732fb..e2c7550 100644 --- a/src/api_s2c/hbzb/jfs/ApiOpen.ts +++ b/src/api_s2c/hbzb/jfs/ApiOpen.ts @@ -44,6 +44,7 @@ export default async function (call: ApiCall) { call.succ({ ...data, + enemy: data.enemy || [], rank: await getMyRank(call.uid) }); } From 7aaa0699f9448f0302fa1c7adf88fae3158b1318 Mon Sep 17 00:00:00 2001 From: dy Date: Sun, 31 Dec 2023 17:42:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix=20=E7=AB=9E=E6=8A=80=E5=9C=BA=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E6=BF=80=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/public/user.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/public/user.ts b/src/public/user.ts index bc7dd6c..5914259 100644 --- a/src/public/user.ts +++ b/src/public/user.ts @@ -279,9 +279,11 @@ export class UserFun { if (k == 'wxcLv') val = gud.wxcLv.lv; else if (gud[k] != undefined) val = gud[k]; - if (k == 'jjc_rank' && !gud.headFrames[conf.id] && val <= conf.cond[1]) { - gud.headFrames[conf.id] = -1; - change = true; + if (k == 'jjc_rank') { + if (!gud.headFrames[conf.id] && val <= conf.cond[1]) { + gud.headFrames[conf.id] = -1; + change = true; + } else return } else if (!gud.headFrames[conf.id] && val >= conf.cond[1]) { gud.headFrames[conf.id] = -1; change = true;