Files
lotteryLaravel/routes/api/v1/public.php
kang 2e0b257160
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
feat: enhance player authentication and agent management features
- Updated AGENTS.md to clarify player interface bindings and agent account restrictions.
- Improved PlayerAuthLoginController to include captcha verification for player login.
- Enhanced AdminPlayerIndexController with permission checks for admin users.
- Refactored AdminPlayerStoreController to enforce agent node restrictions for non-super admins.
- Introduced new error codes for player authentication failures and updated related services.
- Enhanced validation rules for agent profiles to include settlement cycle options.
- Improved AdminCaptchaService to support separate scopes for admin and player captcha handling.
- Updated various services to ensure proper credit management and settlement processes.
2026-06-17 15:27:00 +08:00

59 lines
2.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\V1\HealthController;
use App\Http\Controllers\Api\V1\Draw\DrawCurrentController;
use App\Http\Controllers\Api\V1\Draw\DrawResultShowController;
use App\Http\Controllers\Api\V1\Draw\DrawResultsIndexController;
use App\Http\Controllers\Api\V1\Currency\CurrencyIndexController;
use App\Http\Controllers\Api\V1\Jackpot\JackpotSummaryController;
use App\Http\Controllers\Api\V1\Play\PlayEffectiveCatalogController;
use App\Http\Controllers\Api\V1\Player\PingController as PlayerPingController;
use App\Http\Controllers\Api\V1\Player\PlayerAuthCaptchaController;
use App\Http\Controllers\Api\V1\Player\PlayerAuthLoginController;
use App\Http\Controllers\Api\V1\Setting\SettingIndexController;
use App\Http\Controllers\Api\V1\Integration\IntegrationRuntimeOriginsController;
/**
* 公开路由(无需登录)。
*/
// 健康检查
Route::get('health', HealthController::class)->name('api.v1.health');
// 币种主数据(公开,只给玩家端展示/金额精度使用)
Route::get('currencies', CurrencyIndexController::class)->name('api.v1.currencies.index');
// 开奖相关(公开)
Route::get('draw/current', DrawCurrentController::class)->name('api.v1.draw.current');
Route::get('draw/results', DrawResultsIndexController::class)->name('api.v1.draw.results');
Route::get('draw/results/{draw_no}', DrawResultShowController::class)
->where('draw_no', '[0-9]{8}-[0-9]{3}')
->name('api.v1.draw.results.show');
// 奖池水位(公开)
Route::get('jackpot/summary', JackpotSummaryController::class)->name('api.v1.jackpot.summary');
// 玩法目录(公开)
Route::get('play/effective', PlayEffectiveCatalogController::class)->name('api.v1.play.effective');
// 玩家端连通性探测
Route::prefix('player')
->name('api.v1.player.')
->group(function (): void {
Route::get('ping', PlayerPingController::class)->name('ping');
Route::middleware('throttle:player-auth-captcha')
->get('auth/captcha', PlayerAuthCaptchaController::class)
->name('auth.captcha');
Route::middleware('throttle:player-auth-login')
->post('auth/login', PlayerAuthLoginController::class)
->name('auth.login');
});
// 系统公共配置(如前端规则等)
Route::get('settings', SettingIndexController::class)->name('api.v1.settings.index');
// iframe 运行时白名单(只公开启用接入站点的 origin不公开密钥
Route::get('integration/runtime-origins', IntegrationRuntimeOriginsController::class)
->name('api.v1.integration.runtime-origins');