__($exception->getMessage()), "data" => [], "code" => $exception->getCode() ]; return response()->json($result); }elseif ($exception instanceof EndException){ $result = [ "msg" => __($exception->getMessage()), "data" => [], "code" => $exception->getCode() ]; return response()->json($result); }elseif ($exception instanceof MemberAuthException){ $result = [ "msg" => __('auth.no_login'), "data" => [], "code" => 401 ]; return response()->json($result); }elseif ($exception instanceof ShopAuthException){ $result = [ "msg" =>__('auth.no_login'), "data" => [], "code" => 401 ]; return response()->json($result); } else { $result = [ "msg" => __('sys.error'), "data" => [], "code" => 0 ]; return response()->json($result); } } return parent::render($request, $exception); } }