Commit 74d8a6b4 by CnChunfeng

修改分页不正确

parent 08503a1a
......@@ -68,7 +68,7 @@ class MessageApiController extends Controller
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->getSystemPreachList($data);
echo json_encode(['code'=>0,'count'=>count($returnData),'data'=>$returnData,'msg'=>'获取成功']);
echo json_encode(['code'=>0,'count'=>$returnData['total'],'data'=>$returnData['data'],'msg'=>'获取成功']);
exit();
}catch(\Exception $e){
echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
......@@ -82,7 +82,7 @@ class MessageApiController extends Controller
$data = $request->all();
try{
$returnData = (new SystemNoticeLogic())->getSystemBulletinList($data);
echo json_encode(['code'=>0,'count'=>count($returnData),'data'=>$returnData,'msg'=>'获取成功']);
echo json_encode(['code'=>0,'count'=>$returnData['total'],'data'=>$returnData['data'],'msg'=>'获取成功']);
exit();
}catch(\Exception $e){
echo json_encode(['code'=>400,'msg'=>$e->getMessage()]);
......
......@@ -56,7 +56,7 @@ class SystemNoticeLogic
$value['data_json'] = json_encode($value);
}
return $returnData['data'];
return $returnData;
}
//获得系统公告列表
......@@ -73,7 +73,7 @@ class SystemNoticeLogic
$value['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
$value['data_json'] = json_encode($value);
}
return $returnData['data'];
return $returnData;
}
//保存或者新增数据
......
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 sign in to comment