2025-06-25 11:52:01 +08:00

30 lines
815 B
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
namespace app\business\middleware;
use Closure;
use think\Request;
use think\Response;
class Auth
{
// public function handle(Request $request, Closure $next): Response
// {
// // 获取当前请求的控制器和方法
// $controller = $request->controller();
// $action = $request->action();
// // 如果请求的控制器是 Supplier 且方法是 sendintention则跳过验证
// if ($controller === 'Supplier' && $action === 'sendintention') {
// return $next($request);
// }
// // 执行登录验证逻辑
// if (!session('?user_id')) {
// // 未登录,返回错误或重定向到登录页面
// return redirect('login/index');
// }
// return $next($request);
// }
}