diff --git a/application/common.php b/application/common.php index 4aa208b..8fe288e 100644 --- a/application/common.php +++ b/application/common.php @@ -132,3 +132,11 @@ function add_usermsg($userid, $content, $url) { $msgdata['ctime'] = time(); return $msg_obj->insert($msgdata); } + +function jsonSuccess($data){ + return json(['code'=>0,'msg'=>'success','data'=>$data]); +} + +function jsonError($msg){ + return json(['code'=>1,'msg'=>$msg]); +} \ No newline at end of file