<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Middleware; use Illuminate\Support\Facades\Session; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use Module\Member\Support\MemberLoginCheck; use Module\Member\Type\MemberStatus; use Module\Member\Util\MemberUtil; use Module\Vendor\Support\ResponseCodes; class ApiAuthMiddleware { public function handle($sqTc8, \Closure $k4aFB) { goto wImgv; rnIo5: if (empty($d4RRw)) { if (is_subclass_of($h42gY, MemberLoginCheck::class)) { if (property_exists($h42gY, 'memberLoginCheckIgnores') && is_array($h42gY::$memberLoginCheckIgnores) && in_array($uNY85, $h42gY::$memberLoginCheckIgnores)) { } else { return Response::json(ResponseCodes::LOGIN_REQUIRED, '请登录', null, modstart_web_url('login', array('redirect' => Request::currentPageUrl()))); } } } goto kFwCo; kFwCo: Session::put('memberUserId', $d4RRw); goto Yejo5; WFv94: $J09PA = null; goto KSt8E; wImgv: list($h42gY, $uNY85) = Request::getControllerAction(); goto txKzf; Yejo5: Session::flash('_memberUser', $J09PA); goto fnvPj; txKzf: $d4RRw = intval(Session::get('memberUserId', 0)); goto WFv94; fnvPj: return $k4aFB($sqTc8); goto sG48G; KSt8E: if ($d4RRw) { goto YvnUQ; BaZLr: if ($J09PA) { switch ($J09PA['status']) { case MemberStatus::FORBIDDEN: $J09PA = null; break; } if ($J09PA['isDeleted']) { $J09PA = null; } } goto iBr8p; VTxOM: MemberUtil::processDefault($J09PA); goto BaZLr; YvnUQ: $J09PA = MemberUtil::get($d4RRw); goto VTxOM; iBr8p: } goto fxYDm; fxYDm: if ($d4RRw && !$J09PA) { $d4RRw = 0; Session::forget('memberUserId'); } goto rnIo5; sG48G: } }