@@ -27,6 +27,15 @@ class DistAuth
}
+ //判断是否登录,如果getDistributor不存在,则触发登录页面
+ if (Admin::user()) {
+ if (!getDistributor()) {
+ if (strpos($request->url(), 'auth/logout') == false) {
+ // 存在时的逻辑
+ return redirect('/dist/auth/logout');
+ }
//否则继续处理当前请求
return $next($request);