feat: 统一修改code默认值,0为正常,500为默认异常,其他数值异常

This commit is contained in:
augushong
2025-04-14 19:46:46 +08:00
parent 22a37d1bea
commit 010fd3f240
5 changed files with 8 additions and 8 deletions

View File

@@ -190,7 +190,7 @@ function json_message($data = [], $code = 0, $msg = '')
'jump_to_url' => $data,
];
} else {
$code = $code === 0 ? 500 : $code;
$code = $code;
$msg = $data;
$data = [];
}