元旦活动

This commit is contained in:
dy 2023-12-29 16:21:40 +08:00
parent aa671a332b
commit d5d5d72bad
8 changed files with 13 additions and 14 deletions

View File

@ -31,5 +31,5 @@ export default async function (call: ApiCall<ReqDMRec, ResDMRec>) {
call.succ({prize}) call.succ({prize})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
} }

View File

@ -32,5 +32,5 @@ export default async function (call: ApiCall<ReqDZRec, ResDZRec>) {
call.succ({[gift.id]: prize}) call.succ({[gift.id]: prize})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
} }

View File

@ -25,5 +25,5 @@ export default async function (call: ApiCall<ReqExchange, ResExchange>) {
call.succ({}) call.succ({})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
} }

View File

@ -29,9 +29,9 @@ export default async function (call: ApiCall<ReqTaskRec, ResTaskRec>) {
await PlayerFun.sendPrize(call, _prize); await PlayerFun.sendPrize(call, _prize);
let changedata = { data: _mydata, prize: _prize} let changedata = { data: _mydata, prize: _prize}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata); call.succ(changedata);
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
} }

View File

@ -40,5 +40,5 @@ export default async function (call: ApiCall<ReqZLRec, ResZLRec>) {
call.succ({[call.req.id]: prize}) call.succ({[call.req.id]: prize})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
} }

View File

@ -24,7 +24,7 @@ export class Yuandanfun {
exchange: {}, exchange: {},
taskfinish: [], taskfinish: [],
taskval: await this.getTaskVal(call), taskval: await this.getTaskVal(call),
qiandaoTime: data?.qiandaoTime || 0, qiandaoTime: data?.qiandaoTime || 1,
refreshTime: G.time refreshTime: G.time
}, },
}, {upsert: true, returnDocument: 'after'})).value }, {upsert: true, returnDocument: 'after'})).value

View File

@ -349,7 +349,7 @@ export class HuoDongHongDianFun {
ishd = await this.pobinglibao(call, element) ishd = await this.pobinglibao(call, element)
} }
if (element.htype == 14) { if (element.htype == 14) {
// 检测 htype 10 破冰活动红点 // 检测 htype 10 元旦活动红点
ishd = await this.yuandan(call, element) ishd = await this.yuandan(call, element)
} }
@ -392,16 +392,15 @@ export class HuoDongHongDianFun {
if (data?.gameNum < _hd.data.gamefree) return {show: true} if (data?.gameNum < _hd.data.gamefree) return {show: true}
if (!PublicShared.chkSameDate(data?.qiandaoTime || 0, G.time)) { if (!PublicShared.chkSameDate(data?.qiandaoTime || 1, G.time)) {
return {show: true} return {show: true}
} }
for (let i = 1; i <= data.taskval.length; i++) { for (const i in data.taskval) {
if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i + '')) { if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i)) {
return {show: true} return {show: true}
} }
} }
return {show: false} return {show: false}
} }

View File

@ -55,7 +55,7 @@ export type hongdianKey =
| 'pobinglibao' | 'pobinglibao'
| 'payForDiamond' | 'payForDiamond'
| 'leichonglibao' | 'leichonglibao'
| 'yuandan';
export type hongdianVal = { export type hongdianVal = {
show?: boolean; show?: boolean;
// 看功能需要 // 看功能需要