周末礼包
This commit is contained in:
parent
39cb12ac9a
commit
39362ea6ab
@ -12,8 +12,6 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
let _hd = (await HuoDongFun.gethdList(call, 9))[0]
|
||||
|
||||
let payIds = _hd?.data?.gift?.filter(i => i.payId)?.map(i => i.payId)
|
||||
await checkResetBuyLog(call)
|
||||
await getConf(call)
|
||||
|
||||
call.succ({
|
||||
record: data?.record || {},
|
||||
|
@ -99,7 +99,7 @@ export class PayFun {
|
||||
}).toArray();
|
||||
|
||||
if (payIds?.length) {
|
||||
return Object.fromEntries(payIds.map(id => [id, logs[id] || []]));
|
||||
return Object.fromEntries(payIds.map(id => [id, logs.find(i => i.key == id)?.values || []]));
|
||||
}
|
||||
let allLogs = {}
|
||||
logs.map(i => allLogs[i.key] = i.values)
|
||||
@ -372,7 +372,11 @@ export class PayFun {
|
||||
}
|
||||
|
||||
if (conf.buys > 0 && buyLog.length >= conf.buys) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1});
|
||||
if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2});
|
||||
|
||||
// todo 没看懂这个判断针对什么支付,不支持周末礼包这个类型的限购,所以加上判断:payId.indexOf('wkdlibao') == -1
|
||||
if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0 && payId.indexOf('wkdlibao') == -1) {
|
||||
return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2});
|
||||
}
|
||||
if (payId.indexOf('136Gift') != -1 && payId != '136Gift1') {
|
||||
buyLog = await this.getPayLog(player.uid, '136Gift1');
|
||||
if (buyLog.slice(-1)[0]?.eTime > G.time) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -3});
|
||||
|
Loading…
Reference in New Issue
Block a user