no message

This commit is contained in:
hellcat 2025-06-28 20:36:29 +08:00
parent 03a9fc8faa
commit 19f4f5199c
2 changed files with 4 additions and 2 deletions

View File

@ -72,8 +72,8 @@ return static function (Slim\App $app): void {
});
// front
// $app->get('/', App\Controllers\FrontController::class . ':index'); // 老实
$app->get('/', App\Controllers\AuthController::class . ':login');
$app->get('/', App\Controllers\FrontController::class . ':index'); // 老实
// $app->get('/', App\Controllers\AuthController::class . ':login');
$app->get('/code/{code}', App\Controllers\FrontController::class . ':index');
// $app->get('/sales', App\Controllers\FrontController::class . ':sales');
// $app->get('/aff', App\Controllers\FrontController::class . ':aff');

View File

@ -23,6 +23,8 @@ final class FrontController extends BaseController
public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
{
return $response->withHeader('Location', '/auth/login')->withStatus(302);
if (@$args['code']) {
$sAffCode = $this->antiXss->xss_clean($args['code']);
setcookie('affCode', $sAffCode, (time() + (86400 * 1)), "/");