Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix
This commit is contained in:
commit
8e9553386f
@ -35,6 +35,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
if (!cache[call.uid]) cache[call.uid] = {hid:{}};
|
if (!cache[call.uid]) cache[call.uid] = {hid:{}};
|
||||||
if (!cache[call.uid][hid]) cache[call.uid][hid] = setInfo;
|
if (!cache[call.uid][hid]) cache[call.uid][hid] = setInfo;
|
||||||
_info[hid] = setInfo
|
_info[hid] = setInfo
|
||||||
|
|
||||||
G.server.sendMsgByUid(call.uid, 'msg_s2c/HongDianChange', ['huodonghd']);
|
G.server.sendMsgByUid(call.uid, 'msg_s2c/HongDianChange', ['huodonghd']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
|||||||
_mydata.lunci += 1
|
_mydata.lunci += 1
|
||||||
_setData["taskval"] = _mydata.taskval
|
_setData["taskval"] = _mydata.taskval
|
||||||
_setData["lunci"] = _mydata.lunci
|
_setData["lunci"] = _mydata.lunci
|
||||||
|
_setData["finishid"] = _mydata.finishid
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置任务改变数据
|
// 设置任务改变数据
|
||||||
|
@ -16,8 +16,8 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
|||||||
if (call.req.index > day) return call.errorCode(-3);
|
if (call.req.index > day) return call.errorCode(-3);
|
||||||
if (rec.includes(call.req.index)) return call.errorCode(-4);
|
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]));
|
await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index]));
|
||||||
|
Loading…
Reference in New Issue
Block a user