Skip to content

Commit ded07ea

Browse files
committed
update
1 parent 7b26d86 commit ded07ea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/app/Common/BaseController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,13 @@ protected function escapeJs(string $string): string
272272
/**
273273
* 业务成功统一返回结构:
274274
* { "error_code": 0, "data": {...} }
275+
*
276+
* @param Response $response 响应对象
277+
* @param mixed $data 返回数据,可以是数组、字符串或其他可序列化的类型
278+
* @param int $status HTTP 状态码
279+
* @return Response
275280
*/
276-
protected function success(Response $response, array $data = [], int $status = 200): Response
281+
protected function success(Response $response, mixed $data = [], int $status = 200): Response
277282
{
278283
return $this->json($response, [
279284
'error_code' => 0,

0 commit comments

Comments
 (0)