fix:圣诞活动充值不到账
This commit is contained in:
parent
80908e5a46
commit
1b222a9fc6
@ -117,7 +117,7 @@ export class Christmasfun {
|
|||||||
return mydata
|
return mydata
|
||||||
}
|
}
|
||||||
|
|
||||||
static async payChristmas(payid, call: ApiCall) {
|
static async payChristmas(payid, call: any) {
|
||||||
let _hd = await HuoDongFun.gethdList(call, 8)
|
let _hd = await HuoDongFun.gethdList(call, 8)
|
||||||
for (let index = 0; index < _hd.length; index++) {
|
for (let index = 0; index < _hd.length; index++) {
|
||||||
const hdinfo = _hd[index];
|
const hdinfo = _hd[index];
|
||||||
@ -126,8 +126,8 @@ export class Christmasfun {
|
|||||||
let _mydata = await Christmasfun.getMyData(call, _hdid)
|
let _mydata = await Christmasfun.getMyData(call, _hdid)
|
||||||
if (_mydata.pay) continue
|
if (_mydata.pay) continue
|
||||||
await this.setMyData(call.uid, _hdid, { $set: { pay: true} })
|
await this.setMyData(call.uid, _hdid, { $set: { pay: true} })
|
||||||
let _prize = hdinfo.data.zlpayprize
|
// let _prize = hdinfo.data.zlpayprize
|
||||||
await PlayerFun.sendPrize(call, _prize);
|
// await PlayerFun.sendPrize(call, _prize);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const libaos = hdinfo.data.libao
|
const libaos = hdinfo.data.libao
|
||||||
@ -140,6 +140,12 @@ export class Christmasfun {
|
|||||||
if (_buyNum >= _tmp["buynum"]) continue
|
if (_buyNum >= _tmp["buynum"]) continue
|
||||||
_mydata.libao[lbid] = _buyNum + 1
|
_mydata.libao[lbid] = _buyNum + 1
|
||||||
this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} })
|
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
|
break
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -177,8 +177,6 @@ export function addListener() {
|
|||||||
ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
||||||
|
|
||||||
if (payId == G.gc.zhanling.payId) payZhanLing(player);
|
if (payId == G.gc.zhanling.payId) payZhanLing(player);
|
||||||
//圣诞节活动充值
|
|
||||||
Christmasfun.payChristmas(payId, call);
|
|
||||||
let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan'];
|
let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan'];
|
||||||
if (payEmailConf?.length > 0) {
|
if (payEmailConf?.length > 0) {
|
||||||
let sendEmailConfs = payEmailConf;
|
let sendEmailConfs = payEmailConf;
|
||||||
|
@ -10,6 +10,7 @@ import {call, PlayerFun} from './player';
|
|||||||
import {number} from "mathjs";
|
import {number} from "mathjs";
|
||||||
import {getGud} from './gud';
|
import {getGud} from './gud';
|
||||||
import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen';
|
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) {
|
async function checkPayIsActive(payId: string, logs: payLog[], payArgs) {
|
||||||
let conf: any = await this.getConf(payId, payArgs);
|
let conf: any = await this.getConf(payId, payArgs);
|
||||||
@ -230,7 +231,8 @@ export class PayFun {
|
|||||||
let conf = await zmlbGetConf(call, {payId})
|
let conf = await zmlbGetConf(call, {payId})
|
||||||
prize.push(...conf.prize)
|
prize.push(...conf.prize)
|
||||||
}
|
}
|
||||||
|
//圣诞节活动充值
|
||||||
|
await Christmasfun.payChristmas(payId, call);
|
||||||
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player)
|
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player)
|
||||||
if (isReplaceConf) {
|
if (isReplaceConf) {
|
||||||
let prizePayId = `zuanshi_${conf.money}`
|
let prizePayId = `zuanshi_${conf.money}`
|
||||||
@ -239,7 +241,6 @@ export class PayFun {
|
|||||||
prize = [...conf.prize]
|
prize = [...conf.prize]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await PlayerFun.sendPrize(call, prize);
|
await PlayerFun.sendPrize(call, prize);
|
||||||
await PlayerFun.addAttr(call, conf.payExp);
|
await PlayerFun.addAttr(call, conf.payExp);
|
||||||
if (payId == 'G123SendGift') {
|
if (payId == 'G123SendGift') {
|
||||||
|
Loading…
Reference in New Issue
Block a user