Commit a813110b by zhufx

Merge remote-tracking branch 'origin/master'

parents 6621d51c 14e057d2
......@@ -10,29 +10,13 @@ class CommonController
{
/**
* 业务层-错误时响应
*
* @param integer $errorCode
* @param string $msg
* @param mixed $data
* @return array
*/
public static function error(int $errorCode, string $msg, $data=null) {
return [
'errorCode' => $errorCode,
'msg' => $msg,
'data' => $data,
];
}
/**
* 业务层-正确时响应
*
* @param mixed $data
* @param string $msg
* @return void
* @return array
*/
public static function success($data, string $msg='') {
public function success($data, string $msg='') {
return [
'data' => $data,
'msg' => $msg,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment