|
|
@@ -12,39 +12,27 @@ class BaseData extends BasicLife
|
|
|
* 获取来客绑定的所有门店
|
|
|
* 一页最多50条
|
|
|
*/
|
|
|
- public function getStoreData(string $account,int $page = 1,int $size = 50)
|
|
|
+ public function getStoreData(string $account,int $page = 1,int $size = 50): array
|
|
|
{
|
|
|
$data = [
|
|
|
"account_id" => $account,
|
|
|
"page" => $page,
|
|
|
"size" => $size
|
|
|
];
|
|
|
- $url = "{$this->gateway}goodlife/v1/shop/poi/query/";
|
|
|
- $result = Http::asJson()->withHeaders($this->header)->get($url,$data)->array();
|
|
|
- if(!empty($result['data']))
|
|
|
- {
|
|
|
- return $result['data'];
|
|
|
- }
|
|
|
- return [];
|
|
|
+ return $this->curlGetApi("goodlife/v1/shop/poi/query/",$data);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取来客绑定的所有分类
|
|
|
*/
|
|
|
- public function getStoreCategoryData(string $account)
|
|
|
+ public function getStoreCategoryData(string $account): array
|
|
|
{
|
|
|
$data = [
|
|
|
"account_id" => $account,
|
|
|
"query_category_type" => 1
|
|
|
];
|
|
|
- $url = "{$this->gateway}goodlife/v1/goods/category/get/";
|
|
|
- $result = Http::asJson()->withHeaders($this->header)->get($url,$data)->array();
|
|
|
- if(!empty($result['data']))
|
|
|
- {
|
|
|
- return $result['data'];
|
|
|
- }
|
|
|
- return [];
|
|
|
+ return $this->curlGetApi("goodlife/v1/goods/category/get/",$data);
|
|
|
}
|
|
|
|
|
|
}
|