BaseData.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\extra\dyLife\data;
  3. use app\extra\dyLife\BasicLife;
  4. use yzh52521\EasyHttp\Http;
  5. class BaseData extends BasicLife
  6. {
  7. /**
  8. * 获取来客绑定的所有门店
  9. * 一页最多50条
  10. */
  11. public function getStoreData(string $account,int $page = 1,int $size = 50): array
  12. {
  13. $data = [
  14. "account_id" => $account,
  15. "page" => $page,
  16. "size" => $size
  17. ];
  18. return $this->curlGetApi("goodlife/v1/shop/poi/query/",$data);
  19. }
  20. /**
  21. * 获取来客绑定的所有分类
  22. */
  23. public function getStoreCategoryData(string $account): array
  24. {
  25. $data = [
  26. "account_id" => $account,
  27. "query_category_type" => 1
  28. ];
  29. return $this->curlGetApi("goodlife/v1/goods/category/get/",$data);
  30. }
  31. /**
  32. * 查下商品模板
  33. */
  34. public function getStoreCategoryTemplate(string $category_id,int $product_type = 1): array
  35. {
  36. $data = compact("category_id","product_type");
  37. print_r($data);
  38. return $this->curlGetApi("goodlife/v1/goods/template/get/",$data);
  39. }
  40. }