From 02549f4febd1be845b6d76d54b12394a04fc8e89 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Fri, 6 Mar 2026 10:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96/api/game/playStart=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/api/controller/GameController.php | 7 +------ server/app/api/logic/PlayStartLogic.php | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/server/app/api/controller/GameController.php b/server/app/api/controller/GameController.php index 900d757..0e6e781 100644 --- a/server/app/api/controller/GameController.php +++ b/server/app/api/controller/GameController.php @@ -71,11 +71,6 @@ class GameController extends OpenController { $userId = (int) ($request->player_id ?? 0); $direction = $request->post('direction'); - if (empty($direction)) { - Log::error('传递的参数为direction = '.$direction); - return $this->fail('请传递 direction 参数', ReturnCode::PARAMS_ERROR); - } - $direction = (int) $direction; if (!in_array($direction, [0, 1], true)) { return $this->fail('direction 必须为 0 或 1', ReturnCode::PARAMS_ERROR); } @@ -88,7 +83,7 @@ class GameController extends OpenController $minCoin = abs($minEv + 100); $coin = (float) $player->coin; if ($coin < $minCoin) { - return $this->success([], '当前玩家余额小于DiceRewardConfigMin.real_ev+100无法继续游戏'); + return $this->success([], '当前玩家余额'.$coin.'小于'.$minCoin.'无法继续游戏'); } try { diff --git a/server/app/api/logic/PlayStartLogic.php b/server/app/api/logic/PlayStartLogic.php index d31c3f1..c0943a5 100644 --- a/server/app/api/logic/PlayStartLogic.php +++ b/server/app/api/logic/PlayStartLogic.php @@ -52,7 +52,7 @@ class PlayStartLogic $minCoin = abs($minEv + self::MIN_COIN_EXTRA); $coin = (float) $player->coin; if ($coin < $minCoin) { - throw new ApiException('当前玩家余额小于DiceRewardConfigMin.real_ev+100无法继续游戏'); + throw new ApiException('当前玩家余额'.$coin.'小于'.$minCoin.'无法继续游戏'); } $paid = (int) ($player->paid_ticket_count ?? 0);