From 50c3fb8e26fd9bd7a5f6f4ebcd0c2fbf991dcd0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Wed, 30 Jan 2019 17:39:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Client.php | 3 ++- src/Providers/BaseServiceProvider.php | 4 +++- src/views/tool.blade.php | 9 ++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Client.php b/src/Client.php index 2e85377..7dddfaf 100644 --- a/src/Client.php +++ b/src/Client.php @@ -118,7 +118,8 @@ class Client extends JsonRpc } if (isset($body['error']) && isset($body['error']['code']) && isset($body['error']['message'])) { $message = is_array($body['error']['message']) ? json_encode($body['error']['message']) : $body['error']['message']; - throw new RpcServerException($message, $body['error']['code']); + $e = new RpcServerException($message, $body['error']['code']); + throw $e; } return $body['result']; diff --git a/src/Providers/BaseServiceProvider.php b/src/Providers/BaseServiceProvider.php index 4200a9d..9a74fd6 100644 --- a/src/Providers/BaseServiceProvider.php +++ b/src/Providers/BaseServiceProvider.php @@ -20,7 +20,9 @@ class BaseServiceProvider extends ServiceProvider //local '127.0.0.1', //北京办公区 - '172.16.100.0/16' + '172.16.100.0/16', + //aliyun slb + '100.116.71.0/16', ], Request::HEADER_X_FORWARDED_ALL); } diff --git a/src/views/tool.blade.php b/src/views/tool.blade.php index 5d211d7..04f31d7 100644 --- a/src/views/tool.blade.php +++ b/src/views/tool.blade.php @@ -81,9 +81,12 @@ code        : {{$error['code']}}
message : {{$error['message']}} -
返回内容:
- -
+ @if($error['resp']) +
返回内容:
+ +
+ @endif @endif @if( !empty($result) )
Result: