Merge branch 'feature/planb' into dev
This commit is contained in:
commit
1e46f70cd9
@ -9,6 +9,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'})
|
||||
|
||||
let _hd = (await HuoDongFun.gethdList(call, 10))[0]
|
||||
if (!_hd) return call.errorCode(-1)
|
||||
|
||||
let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId)
|
||||
|
||||
|
@ -19,9 +19,9 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
||||
// 取奖励列表,判断是否有可领取奖励
|
||||
let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'})
|
||||
let rec = data?.record?.[call.req.id].length
|
||||
if (rec && (rec >= 2 || data?.record?.[gift.id] == call.req.recId)) return call.errorCode(-3)
|
||||
if (rec && (rec >= 3 || data?.record?.[gift.id] == call.req.recId)) return call.errorCode(-3)
|
||||
|
||||
await PlayerFun.sendPrize(call, gift.prize);
|
||||
await PlayerFun.sendPrize(call, gift[call.req.recId]);
|
||||
|
||||
await G.mongodb.cEvent('pobinglibao').updateOne({uid: call.uid, type: 'pobinglibao'}, {
|
||||
$push: {[`record.${gift.id}`]: call.req.recId},
|
||||
|
@ -393,7 +393,7 @@ export class HuoDongHongDianFun {
|
||||
// 取奖励列表,判断是否有可领取奖励
|
||||
let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'})
|
||||
let rec = data?.record?.[call.req.id].length
|
||||
if (rec && (rec >= 2 || data?.record?.[gift.id] == call.req.recId)) return {show: false}
|
||||
if (rec && (rec >= 3 || data?.record?.[gift.id] == call.req.recId)) return {show: false}
|
||||
return {show: true}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user