fix数据刷新
This commit is contained in:
parent
8f3cb3e091
commit
65417fb8bd
@ -35,7 +35,7 @@ export class Yuandanfun {
|
||||
|
||||
static async refreshPayLog(call: ApiCall) {
|
||||
let _hd = await this.getCon(call)
|
||||
let payIds = _hd?.data?.gift?.filter(i=>i.payId).map(i=>i.payId)
|
||||
let payIds = _hd?.data?.gift?.filter(i => i.payId).map(i => i.payId)
|
||||
PayFun.delPayLog(call.uid, ...payIds.map(i => {
|
||||
return {payId: i, val: []}
|
||||
}))
|
||||
@ -74,7 +74,8 @@ export class Yuandanfun {
|
||||
let _hd = await this.getCon(call)
|
||||
if (!_hd) return
|
||||
|
||||
// let _mydata = await Christmasfun.getMyData(call, hdid)
|
||||
await this.getData(call, _hd.hdid)
|
||||
|
||||
let _tasks = _hd.data.task
|
||||
|
||||
let _setData = {
|
||||
@ -88,7 +89,6 @@ export class Yuandanfun {
|
||||
let _taskCon = _tasks[ele]
|
||||
if (_taskCon.stype != stype) continue
|
||||
|
||||
let _pval = _taskCon.pval
|
||||
// 不符合任务要求
|
||||
if (!(await chkCall(_taskCon["cond"], chkval, arg))) continue
|
||||
|
||||
@ -105,10 +105,10 @@ export class Yuandanfun {
|
||||
|
||||
// 设置任务
|
||||
if (isset == 1) {
|
||||
await G.mongodb.collection('event').updateOne(
|
||||
{uid: call.uid, type: `yuandan${_hd.hdid}`},
|
||||
_setData
|
||||
)
|
||||
await G.mongodb.collection('event').updateOne({
|
||||
uid: call.uid,
|
||||
type: `yuandan${_hd.hdid}`
|
||||
}, _setData)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user