发送邮件

This commit is contained in:
2025-03-14 17:10:14 +08:00
parent 624a2628d0
commit 5022d1f3d7
5 changed files with 178 additions and 3 deletions
+4
View File
@@ -58,7 +58,11 @@ class AuthMiddleware implements MiddlewareInterface
if ($isLogin && (!$token || !str_starts_with($token, 'Bearer '))) {
throw new BusinessException('请先登录', 302);
// throw new BusinessException('未提供 Token'.$isLogin, 401);
}elseif(!$isLogin){
return $handler($request);
}
$token = substr($token, 7);
try {
// 验证 Token 并获取用户ID