添加获取本地生活商家列表
This commit is contained in:
parent
1a8b8a4fbd
commit
54c3554987
@ -95,6 +95,40 @@ class LocalStore extends Api
|
||||
return JsonServer::success('查询成功', $data);
|
||||
}
|
||||
|
||||
// 获取本地生活商家列表
|
||||
public function getLocalAllStoreList()
|
||||
{
|
||||
$page = $this->request->get('page_no', $this->page_no);
|
||||
$size = $this->request->get('page_size', $this->page_size);
|
||||
$lists = Db::name('local_store')
|
||||
->where(['store_state' => 1])
|
||||
->order('create_time', 'desc')
|
||||
->page($page, $size)
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
foreach ($lists as &$v) {
|
||||
if (!empty($v['header_image'])) {
|
||||
$v['header_image'] = FileConfig::get('aliyunoss.domain') . 'local_life_shop/' . $v['header_image'];
|
||||
}
|
||||
}
|
||||
|
||||
$count = Db::name('local_store')
|
||||
->where(['user_id' => $this->user_id, 'store_state' => 1])
|
||||
->count();
|
||||
|
||||
$more = is_more($count, $page, $size); //是否有下一页
|
||||
$data = [
|
||||
'list' => $lists,
|
||||
'page_no' => $page,
|
||||
'page_size' => $size,
|
||||
'count' => $count,
|
||||
'more' => $more,
|
||||
];
|
||||
|
||||
return JsonServer::success('查询成功', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
*生成本地商家支付二维码
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user