1.优化websocket连接
2.修复游戏实施对局显示错误
This commit is contained in:
@@ -18,7 +18,7 @@ use support\Response;
|
||||
|
||||
class Game extends MobileBase
|
||||
{
|
||||
protected array $noNeedLogin = ['dictionaryList', 'periodHistory'];
|
||||
protected array $noNeedLogin = ['dictionaryList'];
|
||||
|
||||
public function lobbyInit(Request $request): Response
|
||||
{
|
||||
@@ -93,28 +93,6 @@ class Game extends MobileBase
|
||||
]);
|
||||
}
|
||||
|
||||
public function periodHistory(Request $request): Response
|
||||
{
|
||||
$response = $this->initializeMobile($request);
|
||||
if ($response !== null) {
|
||||
return $response;
|
||||
}
|
||||
$limit = $this->intValue($request->input('limit', 30));
|
||||
if ($limit < 1) {
|
||||
$limit = 30;
|
||||
}
|
||||
$list = GameRecord::whereNotNull('result_number')->order('id', 'desc')->limit($limit)->select();
|
||||
$rows = [];
|
||||
foreach ($list as $item) {
|
||||
$rows[] = [
|
||||
'period_no' => $item->period_no,
|
||||
'result_number' => $item->result_number,
|
||||
'open_time' => $item->update_time,
|
||||
];
|
||||
}
|
||||
return $this->mobileSuccess(['list' => $rows]);
|
||||
}
|
||||
|
||||
public function periodCurrent(Request $request): Response
|
||||
{
|
||||
$response = $this->initializeMobile($request);
|
||||
@@ -138,14 +116,6 @@ class Game extends MobileBase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 与前端文档对齐:/api/game/current_status
|
||||
*/
|
||||
public function currentStatus(Request $request): Response
|
||||
{
|
||||
return $this->periodCurrent($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 兼容旧路由:/api/game/betPlace
|
||||
* 新语义与 place_bet 一致:bet_amount 作为“单注金额”。
|
||||
|
||||
Reference in New Issue
Block a user