From 63c7fe6111124099049bb2f7ad1d931a5e27bd14 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Mon, 7 Dec 2020 14:25:25 +0800 Subject: [PATCH] 20201112 --- application/common.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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