City.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\merchant\store\shipping;
  12. use think\App;
  13. use crmeb\basic\BaseController;
  14. use app\common\repositories\store\shipping\CityRepository as repository;
  15. class City extends BaseController
  16. {
  17. protected $repository;
  18. /**
  19. * City constructor.
  20. * @param App $app
  21. * @param repository $repository
  22. */
  23. public function __construct(App $app, repository $repository)
  24. {
  25. parent::__construct($app);
  26. $this->repository = $repository;
  27. }
  28. /**
  29. * @Author:Qinii
  30. * @Date: 2020/5/8
  31. * @Time: 14:40
  32. * @return mixed
  33. */
  34. public function lst()
  35. {
  36. return app('json')->success($this->repository->getFormatList([['is_show', '=', 1],['level','<',2]]));
  37. }
  38. /**
  39. * @return mixed
  40. * @author Qinii
  41. */
  42. public function getlist()
  43. {
  44. return app('json')->success($this->repository->getFormatList(['is_show' => 1]));
  45. }
  46. }