1.优化后台测试推送功能页面

2.优化开奖和实时对局页面
This commit is contained in:
2026-04-18 17:16:13 +08:00
parent 5c07967bf9
commit c184fa8a46
14 changed files with 582 additions and 78 deletions

View File

@@ -76,6 +76,9 @@ class Live extends Backend
return $this->success((string) $res['msg'], $res);
}
/**
* 预约本期开奖号码(倒计时结束后自动开奖,不立即开奖)。
*/
public function draw(WebmanRequest $request): Response
{
$response = $this->initializeBackend($request);
@@ -88,10 +91,13 @@ class Live extends Backend
$recordIdRaw = $request->post('record_id');
$recordId = is_numeric((string) $recordIdRaw) ? (int) $recordIdRaw : null;
$manualRaw = $request->post('manual_number');
$manualNumber = is_numeric((string) $manualRaw) ? (int) $manualRaw : null;
$res = GameLiveService::drawResult($recordId, $manualNumber);
if (!is_numeric((string) $manualRaw)) {
return $this->error('请填写开奖号码');
}
$manualNumber = (int) $manualRaw;
$res = GameLiveService::scheduleDraw($recordId, $manualNumber);
if (!($res['ok'] ?? false)) {
return $this->error((string) ($res['msg'] ?? '开奖失败'));
return $this->error((string) ($res['msg'] ?? '预约失败'));
}
return $this->success((string) $res['msg'], $res);
}