修补api/gm接口的几处错误

This commit is contained in:
2025-07-16 03:12:35 +08:00
parent d76625fb34
commit 974cc83476
9 changed files with 80 additions and 29 deletions
@@ -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];
}