Merge branch 'bugfix' into release

This commit is contained in:
dy 2023-12-31 17:43:30 +08:00
commit 428033b26f
2 changed files with 7 additions and 4 deletions

View File

@ -29,7 +29,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
//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};
});
@ -44,6 +44,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
call.succ({
...data,
enemy: data.enemy || [],
rank: await getMyRank(call.uid)
});
}

View File

@ -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;