From 772993260e9c60243e57f3c94aaa7864a92b968a Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Mon, 25 Dec 2023 19:30:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E6=AD=A5=E6=8C=89=E9=92=AE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/ApiSyncBtn.ts | 2 +- src/api_s2c/event/christmas/ApiLiBao.ts | 1 - src/api_s2c/event/christmas/ApiQianDao.ts | 2 +- src/api_s2c/event/christmas/ApiZhanLingRec.ts | 2 +- src/public/huodongfun.ts | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index 062ff63..959eb6e 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -43,7 +43,7 @@ export default async function (call: ApiCall) { data[key] = {active: false}; change[key] = data[key]; let _hdList = await HuoDongFun.gethdList(call, 8) - if (_hdList) { + if (_hdList.length > 0) { // 无此活动 data[key] = {active: true}; change[key] = data[key]; diff --git a/src/api_s2c/event/christmas/ApiLiBao.ts b/src/api_s2c/event/christmas/ApiLiBao.ts index ad070db..cb87f50 100644 --- a/src/api_s2c/event/christmas/ApiLiBao.ts +++ b/src/api_s2c/event/christmas/ApiLiBao.ts @@ -27,7 +27,6 @@ export default async function (call: ApiCall) { // 判断是否选择奖励了 return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 }) } - let _prize: atn[] = _con.basep for (let key in _select) { diff --git a/src/api_s2c/event/christmas/ApiQianDao.ts b/src/api_s2c/event/christmas/ApiQianDao.ts index 0dba7b9..06ac114 100644 --- a/src/api_s2c/event/christmas/ApiQianDao.ts +++ b/src/api_s2c/event/christmas/ApiQianDao.ts @@ -19,7 +19,7 @@ export default async function (call: ApiCall) { _mydata.qiandao.push(i) _prize = _prize.concat(_con[i]) } - if (!_prize){ + if (_prize.length <= 0){ // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } diff --git a/src/api_s2c/event/christmas/ApiZhanLingRec.ts b/src/api_s2c/event/christmas/ApiZhanLingRec.ts index 42a460f..a95ff7d 100644 --- a/src/api_s2c/event/christmas/ApiZhanLingRec.ts +++ b/src/api_s2c/event/christmas/ApiZhanLingRec.ts @@ -30,7 +30,7 @@ export default async function (call: ApiCall) { _mydata.gj.push(index) } - if (!_prize) { + if (_prize.length <= 0) { // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } diff --git a/src/public/huodongfun.ts b/src/public/huodongfun.ts index 99ed2a1..44d16cc 100644 --- a/src/public/huodongfun.ts +++ b/src/public/huodongfun.ts @@ -54,7 +54,6 @@ export class HuoDongFun { if (htype != 0) _where["htype"] = htype let _res = await this.catAllHD(_where) - let result = [] for (let index = 0; index < _res.length; index++) { const element = _res[index];