diff --git a/src/api_s2c/event/yuandan/ApiOpen.ts b/src/api_s2c/event/yuandan/ApiOpen.ts index d077d62..c3ae986 100644 --- a/src/api_s2c/event/yuandan/ApiOpen.ts +++ b/src/api_s2c/event/yuandan/ApiOpen.ts @@ -3,14 +3,18 @@ import {ReqOpen, ResOpen} from "../../../shared/protocols/event/yuandan/PtlOpen" import {HuoDongFun} from "../../../public/huodongfun"; import {PayFun} from "../../../public/pay"; import {Yuandanfun} from "./fun"; +import {PublicShared} from "../../../shared/public/public"; export default async function (call: ApiCall) { let _hd = await Yuandanfun.getCon(call) + if (!_hd) return call.errorCode(-1) let payIds = _hd.data.gift.filter(i => i.payid).map(i => i.payid) + let data = await Yuandanfun.getData(call, _hd.hdid) + call.succ({ - data: await Yuandanfun.getData(call, _hd.hdid), - payLog: await PayFun.getPayLogs(call.uid, payIds) + data: {...data, isSameDay: PublicShared.chkSameDate(data.qiandaoTime, G.time)}, + payLog: await PayFun.getPayLogs(call.uid, payIds), }) } \ No newline at end of file