From fa0f028bae8f48bf23f0809d5055e1c3c9e29da0 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 13 Apr 2025 18:21:37 +0800 Subject: [PATCH] no message --- src/Services/Gateway/Epay.php | 18 +++++++++++++----- src/Services/TomTool/VisitorCount.php | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Services/Gateway/Epay.php b/src/Services/Gateway/Epay.php index fef95b8f..834b5fe7 100755 --- a/src/Services/Gateway/Epay.php +++ b/src/Services/Gateway/Epay.php @@ -125,11 +125,19 @@ final class Epay extends Base 'ret' => 1, 'msg' => '订单发起成功,正在跳转到支付页面...', ]); - } catch (Exception|GuzzleException) { - return $response->withJson([ - 'ret' => 0, - 'msg' => '请求支付失败', - ]); + } catch (Exception|GuzzleException $e) { + if ($user["is_admin"] == 1) { + return $response->withJson([ + 'ret' => 0, + 'msg' => json_encode($e->getMessage()), + ]); + } else { + return $response->withJson([ + 'ret' => 0, + 'msg' => '请求支付失败', + ]); + } + } } diff --git a/src/Services/TomTool/VisitorCount.php b/src/Services/TomTool/VisitorCount.php index 90681ca0..d62d1c41 100755 --- a/src/Services/TomTool/VisitorCount.php +++ b/src/Services/TomTool/VisitorCount.php @@ -22,7 +22,7 @@ final class VisitorCount } else { - $sFrom = $_ENV['short_url'] . "/"; + $sFrom = "隐藏"; }