修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -27,10 +27,10 @@ class CheckLogin implements MiddlewareInterface
try {
$token = JwtToken::getExtend();
} catch (\Throwable $e) {
throw new ApiException('您的登录凭证错误或者已过期,请重新登录', 401);
throw new ApiException('Your login credential is invalid or expired, please login again', 401);
}
if ($token['plat'] !== 'saiadmin') {
throw new ApiException('登录凭证校验失败');
throw new ApiException('Login credential verification failed');
}
// 一次合并设置,避免 setHeader 覆盖导致只保留最后一个
$request->setHeader(array_merge($request->header() ?: [], [