repository = $repository; $this->areaCode = $this->request->param('areaCode', ''); $this->streetCode = $this->request->param('streetCode', ''); if ($this->areaCode == '' && $this->streetCode == '') { throw new ValidateException('请选择地区'); } } // 商户列表 public function merchantList() { [$page, $limit] = $this->getPage(); $where = $this->request->params([ 'status', 'statusTag', 'is_trader', 'category_id', 'type_id', 'area_id', 'street_id']); return app('json')->success($this->repository->lst($where, $page, $limit)); } }