修补api/gm接口的几处错误
This commit is contained in:
@@ -38,9 +38,13 @@
|
||||
if (!$res) {
|
||||
$this->result('没有查询到相应的数据!', [], 0);
|
||||
}
|
||||
$stores = [];
|
||||
foreach ($res as $v) {
|
||||
$stores[] = $v->toArray();
|
||||
}
|
||||
$data= [
|
||||
'total'=>$s['query']->count(),
|
||||
'stores' => $res,
|
||||
'stores' => $stores,
|
||||
'page'=>$this->page
|
||||
];
|
||||
$this->result('网点列表查询成功!', $data, 200);
|
||||
@@ -180,6 +184,7 @@
|
||||
$pages = new Pagination(['totalCount' => $data->count(), 'pageSize' => $this->pageSize]);
|
||||
$_orderby = 'order_by DESC';
|
||||
$res = $data->offset($pages->offset)->limit($pages->limit)->orderBy($_orderby)->all();
|
||||
|
||||
return ['res'=>$res,'query'=>$data];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user