Shop.php 878 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\store\controller\data;
  3. use app\store\controller\Controller;
  4. use app\store\model\store\Shop as ShopModel;
  5. class Shop extends Controller
  6. {
  7. /* @var ShopModel $model */
  8. private $model;
  9. /**
  10. * 构造方法
  11. * @throws \app\common\exception\BaseException
  12. * @throws \think\db\exception\DataNotFoundException
  13. * @throws \think\db\exception\ModelNotFoundException
  14. * @throws \think\exception\DbException
  15. */
  16. public function _initialize()
  17. {
  18. parent::_initialize();
  19. $this->model = new ShopModel;
  20. $this->view->engine->layout(false);
  21. }
  22. /**
  23. * 门店列表
  24. * @return mixed
  25. * @throws \think\exception\DbException
  26. */
  27. public function lists()
  28. {
  29. $list = $this->model->getList($this->request->get());
  30. return $this->fetch('list', compact('list'));
  31. }
  32. }