From 03576fdac60aacbf51d875d30ca322f0fb8dbd1b Mon Sep 17 00:00:00 2001 From: u2nyakim Date: Fri, 29 Aug 2025 16:10:39 +0800 Subject: [PATCH] =?UTF-8?q?up.=20=E5=8F=8C=E5=90=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/BaseController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/BaseController.php b/app/BaseController.php index e8aa16e..c9ad097 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -128,7 +128,7 @@ abstract class BaseController * @param mixed $data * @return Json */ - protected function writeJson(int $code = 200, string $message = '', mixed $data = null): Json + protected function writeJson(int $code = 200, string $message = '', mixed $data = null, $skipEncryption = false): Json { if($data instanceof Paginator) { $data = [ @@ -142,6 +142,9 @@ abstract class BaseController "data" => $data, "message" => $message, ); + if ($skipEncryption) { + return json($result); + } $resultEncrypted = [ 'encryptedData' => \app\Request::encryptCryptoJSAES($result) ];