From 80908e5a46981d08ac392515fe7e4f9d1d963be5 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Tue, 19 Dec 2023 17:38:59 +0800 Subject: [PATCH 01/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=A3=E8=AF=9E=E7=BB=8F=E9=AA=8C=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/ApiTaskRec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/ApiTaskRec.ts b/src/api_s2c/event/christmas/ApiTaskRec.ts index 1227d85..d0af2c9 100644 --- a/src/api_s2c/event/christmas/ApiTaskRec.ts +++ b/src/api_s2c/event/christmas/ApiTaskRec.ts @@ -22,11 +22,14 @@ export default async function (call: ApiCall) { return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_4 }) } _mydata.taskfinish.push(taskid) - + let _addval = _con.addval let _setData = {} + _mydata["val"] += _addval + _setData["val"] = _mydata.val _setData["taskfinish"] = _mydata.taskfinish await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData }) let _prize = _con.prize + await PlayerFun.sendPrize(call, _prize); let changedata = { mydata: _mydata, prize: _prize} // 推送红点 From 1b222a9fc69038f6187b5c87a715d7be2b82e504 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Tue, 19 Dec 2023 19:35:45 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=85=85=E5=80=BC=E4=B8=8D=E5=88=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 12 +++++++++--- src/globalListener.ts | 2 -- src/public/pay.ts | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 327422c..9ecaa7f 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -117,7 +117,7 @@ export class Christmasfun { return mydata } - static async payChristmas(payid, call: ApiCall) { + static async payChristmas(payid, call: any) { let _hd = await HuoDongFun.gethdList(call, 8) for (let index = 0; index < _hd.length; index++) { const hdinfo = _hd[index]; @@ -126,8 +126,8 @@ export class Christmasfun { let _mydata = await Christmasfun.getMyData(call, _hdid) if (_mydata.pay) continue await this.setMyData(call.uid, _hdid, { $set: { pay: true} }) - let _prize = hdinfo.data.zlpayprize - await PlayerFun.sendPrize(call, _prize); + // let _prize = hdinfo.data.zlpayprize + // await PlayerFun.sendPrize(call, _prize); } else{ const libaos = hdinfo.data.libao @@ -140,6 +140,12 @@ export class Christmasfun { if (_buyNum >= _tmp["buynum"]) continue _mydata.libao[lbid] = _buyNum + 1 this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} }) + let _select = _mydata.select[lbid] || {} + let _prize: atn[] = _tmp["basep"] + for (let key in _select) { + _prize.push(_tmp["dlz"][parseInt(key)][_select[key]]) + } + await PlayerFun.sendPrize(call, _prize); break } diff --git a/src/globalListener.ts b/src/globalListener.ts index 2c3aa37..1e81c29 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -177,8 +177,6 @@ export function addListener() { ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); if (payId == G.gc.zhanling.payId) payZhanLing(player); - //圣诞节活动充值 - Christmasfun.payChristmas(payId, call); let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan']; if (payEmailConf?.length > 0) { let sendEmailConfs = payEmailConf; diff --git a/src/public/pay.ts b/src/public/pay.ts index 43a0e58..61fef69 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -10,6 +10,7 @@ import {call, PlayerFun} from './player'; import {number} from "mathjs"; import {getGud} from './gud'; import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen'; +import {Christmasfun} from "../api_s2c/event/christmas/fun"; async function checkPayIsActive(payId: string, logs: payLog[], payArgs) { let conf: any = await this.getConf(payId, payArgs); @@ -230,7 +231,8 @@ export class PayFun { let conf = await zmlbGetConf(call, {payId}) prize.push(...conf.prize) } - + //圣诞节活动充值 + await Christmasfun.payChristmas(payId, call); let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player) if (isReplaceConf) { let prizePayId = `zuanshi_${conf.money}` @@ -239,7 +241,6 @@ export class PayFun { prize = [...conf.prize] } - await PlayerFun.sendPrize(call, prize); await PlayerFun.addAttr(call, conf.payExp); if (payId == 'G123SendGift') { From ec3d872390ec07b39c10f6875a7538c1abffed39 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:17:09 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=BA=A2=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hongdian/fun.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index 4b58691..550b80b 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -364,6 +364,10 @@ export class HuoDongHongDianFun { // 检测 htype 6 七日登录活动红点 ishd = await this.qiridengluHongDian(call, element) } + if (element.htype == 8) { + // 检测 htype 8 圣诞活动红点 + ishd = await this.christmasHongDian(call, element) + } // 此活动有红点 if (ishd.show) { From 4e74b001b57849366601c354989de9ba2d005a34 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:25:22 +0800 Subject: [PATCH 04/11] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9E=E5=9C=A3=E8=AF=9E?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=AF=8F=E6=97=A5=E6=B6=88=E8=80=97=E9=92=BB?= =?UTF-8?q?=E7=9F=B3=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/globalListener.ts | 2 ++ src/public/player.ts | 5 +++++ src/public/taskclass.ts | 11 ++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/globalListener.ts b/src/globalListener.ts index 1e81c29..cb59b16 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -143,6 +143,8 @@ export type gEventType = { Class_task_154: (eventname, call, val, chkVal) => void; /**每日任务宝箱领取 */ Class_task_155: (eventname, call, val, chkVal) => void; + /**每日钻石消耗 */ + Class_task_156: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/player.ts b/src/public/player.ts index d8322dd..1eccfcd 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -169,6 +169,11 @@ export class PlayerFun { change[atn.t] = this.fixAttrLteZero(atn.t, await this.getAtnNum(call, atn) + atn.n); if (atn.t == 'rmbmoney') { this.changeAttrLog(call.conn.uid, change[atn.t], atn, call.conn.gud.rmbmoney) + // 扣除钻石时 + if (atn.n < 0) { + // 监听任务消耗任务 + G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0); + } } all.push(this.changeAttr(call.conn.uid, change)); all.push(this.upAttr(call, {...atn, n: change[atn.t]})); diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index 7271b4e..e18a05d 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -788,7 +788,7 @@ export module manager { isinc = 1 async initVal(call: ApiCall, con) { - return 1; + return 0; } } @@ -797,6 +797,15 @@ export module manager { stype = 155 isinc = 0 + async initVal(call: ApiCall, con) { + return 0; + } + } + // 第58个任务 每日钻石消耗 + export class Class_task_156 extends BaseClass { + stype = 156 + isinc = 1 + async initVal(call: ApiCall, con) { return 1; } From 5ec8b60e99c3e1fb7ab52d65fe9b40aa33ed4ce9 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:39:29 +0800 Subject: [PATCH 05/11] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9E=E5=9C=A3=E8=AF=9E?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AD=BE=E5=88=B0=E4=B9=9F=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E7=BB=8F=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/ApiQianDao.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/api_s2c/event/christmas/ApiQianDao.ts b/src/api_s2c/event/christmas/ApiQianDao.ts index 5eb2830..0dba7b9 100644 --- a/src/api_s2c/event/christmas/ApiQianDao.ts +++ b/src/api_s2c/event/christmas/ApiQianDao.ts @@ -19,17 +19,23 @@ export default async function (call: ApiCall) { _mydata.qiandao.push(i) _prize = _prize.concat(_con[i]) } - if (!_prize){ // 没有奖励可以领取 return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 }) } - - let _setData = {} + let _addVal = 0 + // 懒得喊后台和前端修改了,直接取prize里面的对应的经验字段去添加zhanling经验 + for (const p of _prize) { + // 战令经验 + if (p.t == "shengdanExp") { + _addVal += p.n + } + } + _mydata["val"] += _addVal + _setData["val"] = _mydata.val _setData["qiandao"] = _mydata.qiandao await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData }) - await PlayerFun.sendPrize(call, _prize); let changedata = { mydata: _mydata, prize: _prize} // 推送红点 From 1d7b1a4f5806e754ba4b573bf3a7c836304a1c5c Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 16:59:16 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/hongdian/fun.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/hongdian/fun.ts b/src/api_s2c/hongdian/fun.ts index 550b80b..3f3eeba 100644 --- a/src/api_s2c/hongdian/fun.ts +++ b/src/api_s2c/hongdian/fun.ts @@ -708,7 +708,7 @@ export class HuoDongHongDianFun { for (let indextask = 0; indextask < Object.keys(_tasks).length; indextask++) { const elementtask = Object.keys(_tasks)[indextask]; let _tmp = _tasks[elementtask]; - if (_tmp.pval <= (_mydata.taskval[elementtask] || 0) && !_mydata.taskfinsih.includes(elementtask)) { + if (_tmp.pval <= (_mydata.taskval[elementtask] || 0) && !_mydata.taskfinish.includes(elementtask)) { // 任务完成且没有领取 _res.show = true; return _res; From ad439d0b14cccb51ddd20cb62c41bb4b6485806f Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 17:32:31 +0800 Subject: [PATCH 07/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=A4=BC=E5=8C=85=E6=94=B9=E6=88=90=E6=AF=8F=E6=97=A5=E9=87=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 9ecaa7f..9c1fb4f 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -113,7 +113,11 @@ export class Christmasfun { mydata.taskval = await this.getTaskVal(call, hdid) mydata.refresh = G.time mydata.gamenum = 0 - await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum} }) + mydata.libao = {} + await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, + taskval: mydata.taskval, + gamenum: mydata.gamenum, + libao:mydata.libao} }) return mydata } From 48038d1b0778cefcf7dec06dc55596e9203ca181 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 17:47:37 +0800 Subject: [PATCH 08/11] =?UTF-8?q?fix:=E5=9C=A3=E8=AF=9E=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9Evip=E7=BB=8F=E9=AA=8C=E4=BB=BB=E5=8A=A1157?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/christmas/fun.ts | 4 +++- src/globalListener.ts | 2 ++ src/public/player.ts | 4 ++++ src/public/taskclass.ts | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 9c1fb4f..b3e5fca 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -114,7 +114,9 @@ export class Christmasfun { mydata.refresh = G.time mydata.gamenum = 0 mydata.libao = {} - await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, + await this.setMyData(call.uid, hdid, { $set: { + refresh: mydata.refresh, + taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum, libao:mydata.libao} }) diff --git a/src/globalListener.ts b/src/globalListener.ts index cb59b16..fc2c85b 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -145,6 +145,8 @@ export type gEventType = { Class_task_155: (eventname, call, val, chkVal) => void; /**每日钻石消耗 */ Class_task_156: (eventname, call, val, chkVal) => void; + /**每日获取vip经验 */ + Class_task_157: (eventname, call, val, chkVal) => void; }; export function addListener() { diff --git a/src/public/player.ts b/src/public/player.ts index 1eccfcd..df3e641 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -175,6 +175,10 @@ export class PlayerFun { G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0); } } + // 增加vip经验的任务监听 + if (atn.t == "payExp" && atn.n > 0) { + G.emit("Class_task_157", 'Class_task_157', call, atn.n, 0); + } all.push(this.changeAttr(call.conn.uid, change)); all.push(this.upAttr(call, {...atn, n: change[atn.t]})); //await this.changeAttr(call.conn.uid, change); diff --git a/src/public/taskclass.ts b/src/public/taskclass.ts index e18a05d..5bf3f67 100644 --- a/src/public/taskclass.ts +++ b/src/public/taskclass.ts @@ -810,6 +810,15 @@ export module manager { return 1; } } + // 第59个任务 获得vip经验 + export class Class_task_157 extends BaseClass { + stype = 157 + isinc = 1 + + async initVal(call: ApiCall, con) { + return 0; + } + } } From 05368fc0deb50c0c6e3d8a0bfc9aedef50614fe0 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 18:56:40 +0800 Subject: [PATCH 09/11] =?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 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index 68065df..b420eb8 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -39,15 +39,14 @@ export default async function (call: ApiCall) { } break; case 'christmas': - //领完消失 - if (!data[key]) { - let _hdList = await HuoDongFun.gethdList(call, 8) - if (_hdList) { - // 无此活动 - data[key] = {active: true}; - change[key] = data[key]; - } - } + //领完消失 + change[key] = {active: false}; + let _hdList = await HuoDongFun.gethdList(call, 8) + if (_hdList) { + // 无此活动 + data[key] = {active: true}; + change[key] = data[key]; + } break; case 'dayjijin': case 'dengjijijin': From f1a4daece329e4bd5f71bb502ac7ef4cff8e159d Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 20 Dec 2023 19:03:41 +0800 Subject: [PATCH 10/11] =?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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index b420eb8..062ff63 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -40,7 +40,8 @@ export default async function (call: ApiCall) { break; case 'christmas': //领完消失 - change[key] = {active: false}; + data[key] = {active: false}; + change[key] = data[key]; let _hdList = await HuoDongFun.gethdList(call, 8) if (_hdList) { // 无此活动 From 4690254453cd09ad0d9a5b764948cd9fe67b7b87 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Mon, 25 Dec 2023 19:30:55 +0800 Subject: [PATCH 11/11] =?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];