userInfo = $userinfo['data']; // if (!$this->request->userInfo) { // throw new Exception('管理员未登陆,请先登陆后操作',201); // } } catch (\Exception $err){ return json(['code'=>$err->getCode(),'msg'=>$err->getMessage()]); } return $next($request); } }