元旦活动
This commit is contained in:
parent
aa671a332b
commit
d5d5d72bad
@ -31,5 +31,5 @@ export default async function (call: ApiCall<ReqDMRec, ResDMRec>) {
|
||||
|
||||
call.succ({prize})
|
||||
|
||||
HongDianChange.sendChangeKey(call.uid, ['yuandan']);
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
}
|
||||
|
@ -32,5 +32,5 @@ export default async function (call: ApiCall<ReqDZRec, ResDZRec>) {
|
||||
|
||||
call.succ({[gift.id]: prize})
|
||||
|
||||
HongDianChange.sendChangeKey(call.uid, ['yuandan']);
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
}
|
||||
|
@ -25,5 +25,5 @@ export default async function (call: ApiCall<ReqExchange, ResExchange>) {
|
||||
|
||||
call.succ({})
|
||||
|
||||
HongDianChange.sendChangeKey(call.uid, ['yuandan']);
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ export default async function (call: ApiCall<ReqTaskRec, ResTaskRec>) {
|
||||
|
||||
await PlayerFun.sendPrize(call, _prize);
|
||||
let changedata = { data: _mydata, prize: _prize}
|
||||
// 推送红点
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
|
||||
call.succ(changedata);
|
||||
|
||||
|
||||
// 推送红点
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
}
|
@ -40,5 +40,5 @@ export default async function (call: ApiCall<ReqZLRec, ResZLRec>) {
|
||||
|
||||
call.succ({[call.req.id]: prize})
|
||||
|
||||
HongDianChange.sendChangeKey(call.uid, ['yuandan']);
|
||||
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export class Yuandanfun {
|
||||
exchange: {},
|
||||
taskfinish: [],
|
||||
taskval: await this.getTaskVal(call),
|
||||
qiandaoTime: data?.qiandaoTime || 0,
|
||||
qiandaoTime: data?.qiandaoTime || 1,
|
||||
refreshTime: G.time
|
||||
},
|
||||
}, {upsert: true, returnDocument: 'after'})).value
|
||||
|
@ -349,7 +349,7 @@ export class HuoDongHongDianFun {
|
||||
ishd = await this.pobinglibao(call, element)
|
||||
}
|
||||
if (element.htype == 14) {
|
||||
// 检测 htype 10 破冰活动红点
|
||||
// 检测 htype 10 元旦活动红点
|
||||
ishd = await this.yuandan(call, element)
|
||||
}
|
||||
|
||||
@ -392,16 +392,15 @@ export class HuoDongHongDianFun {
|
||||
|
||||
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}
|
||||
}
|
||||
|
||||
for (let i = 1; i <= data.taskval.length; i++) {
|
||||
if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i + '')) {
|
||||
for (const i in data.taskval) {
|
||||
if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i)) {
|
||||
return {show: true}
|
||||
}
|
||||
}
|
||||
|
||||
return {show: false}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ export type hongdianKey =
|
||||
| 'pobinglibao'
|
||||
| 'payForDiamond'
|
||||
| 'leichonglibao'
|
||||
| 'yuandan';
|
||||
|
||||
export type hongdianVal = {
|
||||
show?: boolean;
|
||||
// 看功能需要
|
||||
|
Loading…
Reference in New Issue
Block a user