fix:优化代码

main
gzydong 2022-05-16 19:36:48 +08:00
parent 4c82c45324
commit b4ed7c69a6
1 changed files with 1 additions and 2 deletions

View File

@ -39,10 +39,9 @@ class Response
$resp = [
"code" => ResponseCode::SUCCESS,
"message" => $message,
"data" => $data,
];
if ($data) $resp["data"] = $data;
return $this->response->json($resp);
}