Merge branch 'develop'

This commit is contained in:
mzl
2025-07-11 18:01:23 +08:00
parent 642c25503d
commit 925c5501f7
83 changed files with 4869 additions and 1162 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ trait ResponseTrait
public function success(
$data = [],
string $message = '请求成功',
int $code = 0,
int $code = 200,
int $httpStatus = 200,
array $header = ['Content-Type' => 'application/json']
): Response {
@@ -38,18 +38,18 @@ trait ResponseTrait
*/
public function error(
string $message = '请求失败',
int $code = 1,
int $code = 400,
int $httpStatus = 400,
$data = [],
array $header = ['Content-Type' => 'application/json']
): Response {
return $this->result('error', $code, $httpStatus, $message, $data, $header);
return $this->result('fail', $code, $httpStatus, $message, $data, $header);
}
/**
* 统一响应格式方法
*
* @param string $status 响应状态,例如 "success" 或 "error"
* @param string $status 响应状态,例如 "success" 或 "fail"
* @param int $code 内部状态码
* @param int $httpStatus HTTP 状态码
* @param string $message 响应消息