Compare commits

...

2 Commits

Author SHA1 Message Date
00804b9b49 矿洞结算bug 2024-01-11 20:23:08 +08:00
b5a9f6f530 积分容错 2024-01-11 19:14:56 +08:00
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ export default async function (call: ApiCall<ReqGetUser, ResGetUser>) {
arr.map(i=>{
res[i.uid] = {
data: i.data,
jifen:i.jifen,
jifen:i?.jifen||0,
};
});

View File

@ -5,7 +5,7 @@ import {ReqYanShi, ResYanShi} from "../../shared/protocols/kuangdong/PtlYanShi";
export default async function (call: ApiCall<ReqYanShi, ResYanShi>) {
return call.errorCode(1)
//return call.errorCode(1)
let hdid = call.req.hdid
let con = await KuangDongfun.getCon(hdid)

View File

@ -179,14 +179,14 @@ export class KuangDongfun {
}
if (!kdInfo) return []
let _con = await this.getCon(hdid)
let _kcTime = G.time + kdInfo.yanshi - kdInfo.ctime
let _kcTime = G.time - kdInfo.ctime
//let _gud = await G.mongodb.collection('user').findOne({uid: kdInfo.uid})
let _gud = await getGud(kdInfo.uid)
let gamer_lv = _gud.lv
// @ts-ignore
let prize: prizeType[] = _con.reward
// let prize: prizeType[] = [{ a: 'attr', t: 'rmbmoney', n: 50 }] // todo 待接入配置
if (_kcTime > 8 * 3600) _kcTime = 8 * 3600 + kdInfo.yanshi // 设置最大时长
if (_kcTime > 8 * 3600 + kdInfo.yanshi) _kcTime = 8 * 3600 + kdInfo.yanshi // 设置最大时长
prize[0]["n"] = Math.floor(eval(_con.formula) * _kcTime)
if (_con.public_map == 1){