PublicServices.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\services\pc;
  13. use app\services\BaseServices;
  14. use app\services\shipping\SystemCityServices;
  15. class PublicServices extends BaseServices
  16. {
  17. /**
  18. * 获取城市数据
  19. * @param int $pid
  20. * @return mixed
  21. */
  22. public function getCity(int $pid)
  23. {
  24. /** @var SystemCityServices $city */
  25. $city = app()->make(SystemCityServices::class);
  26. $list = $city->getColumn(['parent_id' => $pid, 'is_show' => 1], 'city_id,name');
  27. return $list;
  28. }
  29. }