Commit 3684afce authored by tufengqi's avatar tufengqi Committed by ZhuChunYang

返回格式修改

parent 182949eb
......@@ -8,6 +8,7 @@ class BaseConstant
const MSG = 'msg';
const CODE = 'code';
const VAL = 'val';
const DATA = 'data';
const OK = 'ok';
const FINALTAG = 'finaltag';
}
......@@ -65,12 +65,12 @@ class ResponseMsg
* @param int $code
* @return string
*/
public function jsonSuccess($msg = '', $code = 0)
public function jsonSuccess($data = '', $code = 200)
{
$view = [
BaseConstant::CODE => $code,
BaseConstant::MSG => BaseConstant::OK,
BaseConstant::VAL => $msg
BaseConstant::DATA => $data
];
$json = json_encode($view);
return $this->dumpJsonData($json);
......
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