request->filter('trim')->only(['keyword' => '', 'page' => 1, 'size' => 15], 'post'); $val = Validate::rule(Config::get('validate_rules.common')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getPlatformList($param['keyword'], $param['page'], $param['size']); } //获取分类列表 public function getCatList() { $param = $this->request->filter('trim')->only(['keyword' => '', 'pid' => 0], 'post'); $val = Validate::rule(Config::get('validate_rules.getCatList')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getCatList($param['keyword'], $param['pid']); } //获取品牌列表 public function getBrandList() { $param = $this->request->filter('trim')->only(['keyword' => '', 'page' => 1, 'size' => 15], 'post'); $val = Validate::rule(Config::get('validate_rules.common')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getBrandList($param['keyword'], $param['page'], $param['size']); } //获取单位列表 public function getUnitList() { $param = $this->request->filter('trim')->only(['keyword' => '', 'page' => 1, 'size' => 15], 'post'); $val = Validate::rule(Config::get('validate_rules.common')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getUnitList($param['keyword'], $param['page'], $param['size']); } //获取规格标题列表 public function getSpecsTitleList() { $param = $this->request->filter('trim')->only(['keyword' => ''], 'post'); $val = Validate::rule(Config::get('validate_rules.keyword')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getSpecsTitleList($param['keyword']); } //获取规格值列表 public function getSpecsValueByTitleList() { $param = $this->request->filter('trim')->only(['spec_id'], 'post'); $val = Validate::rule(Config::get('validate_rules.getSpecsValueByTitleList')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getSpecsValueByTitleList($param['spec_id']); } //获取省市区列表 public function getAreaList() { $param = $this->request->filter('trim')->only(['level' => 1, 'pid_code' => ''], 'post'); $val = Validate::rule(Config::get('validate_rules.getAreaList')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getAreaList($param['level'], $param['pid_code']); } //获取业务公司编码 public function getCompanyNoList() { $param = $this->request->filter('trim')->only(['keyword' => ''], 'post'); $val = Validate::rule(Config::get('validate_rules.keyword')); if (!$val->check($param)) throw new ValidateException($val->getError()); return IndexLogic::getCompanyNoList($param['keyword']); } }