每日刷新付费礼包

This commit is contained in:
dy 2023-12-27 20:09:59 +08:00
parent add9c7c562
commit 12300703b5

View File

@ -2,6 +2,7 @@ import {ApiCall} from 'tsrpc';
import {HuoDongFun} from '../../../public/huodongfun';
import {christmas} from '../../../shared/protocols/event/christmas/PtlOpen';
import {PublicShared} from '../../../shared/public/public';
import {PayFun} from "../../../public/pay";
export class Yuandanfun {
/**配置 */
@ -27,10 +28,19 @@ export class Yuandanfun {
refreshTime: G.time
},
}, {upsert: true, returnDocument: 'after'})).value
this.refreshPayLog(call)
}
return data
}
static async refreshPayLog(call: ApiCall) {
let _hd = await this.getCon(call)
let payIds = _hd?.data?.gift?.filter(i=>i.payId).map(i=>i.payId)
PayFun.delPayLog(call.uid, ...payIds.map(i => {
return {payId: i, val: []}
}))
}
/**获取所有taskid 及对应的值 */
static async getTaskVal(call: ApiCall) {
let _initCon = await this.getCon(call)