矿洞结算bug

This commit is contained in:
ciniao 2024-01-11 20:23:08 +08:00
parent b5a9f6f530
commit 00804b9b49
2 changed files with 3 additions and 3 deletions

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){