🐞 fix(防加速): 客户端间隔时间小于服务器时不判断

This commit is contained in:
luying
2023-08-14 15:26:32 +08:00
parent c638a27def
commit 00c7c02fd8
2 changed files with 2 additions and 2 deletions
@@ -262,7 +262,7 @@ export class CityActivityHandler {
if(!member.startActionTime || member.startActionTime == 0) {
member.startActionTime = nowSeconds();
}
if(Math.abs(nowSeconds() - member.startActionTime - timegap) > 5) { // 前后端误差超过5秒拦截
if(timegap - (nowSeconds() - member.startActionTime) > 5) { // 前后端误差超过5秒拦截
return resResult(STATUS.SUCCESS, {
isError: true,
timegap: nowSeconds() - member.startActionTime