diff --git a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts index a1d648d..bd9bf35 100644 --- a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts +++ b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts @@ -35,6 +35,7 @@ export default async function (call: ApiCall) { if (!cache[call.uid]) cache[call.uid] = {hid:{}}; if (!cache[call.uid][hid]) cache[call.uid][hid] = setInfo; _info[hid] = setInfo + G.server.sendMsgByUid(call.uid, 'msg_s2c/HongDianChange', ['huodonghd']); } diff --git a/src/api_s2c/event/yangchengmubiao/ApiRec.ts b/src/api_s2c/event/yangchengmubiao/ApiRec.ts index c7c1bae..6d0efa0 100644 --- a/src/api_s2c/event/yangchengmubiao/ApiRec.ts +++ b/src/api_s2c/event/yangchengmubiao/ApiRec.ts @@ -35,6 +35,7 @@ export default async function (call: ApiCall) { _mydata.lunci += 1 _setData["taskval"] = _mydata.taskval _setData["lunci"] = _mydata.lunci + _setData["finishid"] = _mydata.finishid } // 设置任务改变数据 diff --git a/src/api_s2c/event/yuedujijin/ApiRec.ts b/src/api_s2c/event/yuedujijin/ApiRec.ts index 039f191..0db9481 100644 --- a/src/api_s2c/event/yuedujijin/ApiRec.ts +++ b/src/api_s2c/event/yuedujijin/ApiRec.ts @@ -16,8 +16,8 @@ export default async function (call: ApiCall) { if (call.req.index > day) return call.errorCode(-3); if (rec.includes(call.req.index)) return call.errorCode(-4); - - G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true}); + // 从异步改成同步 + await G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true}); await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index]));