修补api/gm接口的几处错误
This commit is contained in:
@@ -36,10 +36,13 @@ class NewsController extends Common
|
||||
if (!$res) {
|
||||
$this->result('没有查询到相应的数据!', [], 0);
|
||||
}
|
||||
|
||||
$news = [];
|
||||
foreach ($res as $v) {
|
||||
$news[] = $v->toArray();
|
||||
}
|
||||
$data= [
|
||||
'total'=>intval($s['query']->count()),
|
||||
'news' => $res,
|
||||
'news' => $news,
|
||||
'page'=>$this->page
|
||||
];
|
||||
$this->result('文章查询成功!', $data, 200);
|
||||
|
||||
Reference in New Issue
Block a user