From 00804b9b49cf62ca857a8f71f5d3b5ce99b5df14 Mon Sep 17 00:00:00 2001 From: ciniao <4041990@qq.com> Date: Thu, 11 Jan 2024 20:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=BF=E6=B4=9E=E7=BB=93=E7=AE=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/kuangdong/ApiYanShi.ts | 2 +- src/public/kuangdong.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api_s2c/kuangdong/ApiYanShi.ts b/src/api_s2c/kuangdong/ApiYanShi.ts index 4ab56b8..62efd2f 100644 --- a/src/api_s2c/kuangdong/ApiYanShi.ts +++ b/src/api_s2c/kuangdong/ApiYanShi.ts @@ -5,7 +5,7 @@ import {ReqYanShi, ResYanShi} from "../../shared/protocols/kuangdong/PtlYanShi"; export default async function (call: ApiCall) { - return call.errorCode(1) + //return call.errorCode(1) let hdid = call.req.hdid let con = await KuangDongfun.getCon(hdid) diff --git a/src/public/kuangdong.ts b/src/public/kuangdong.ts index 942759d..597556e 100644 --- a/src/public/kuangdong.ts +++ b/src/public/kuangdong.ts @@ -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){