request->post('parent_code', ''); return AdminCommonLogic::getAddr($parent_code); } //视频列表 public function getVideoList() { $param = $this->request->only(['page' => 1, 'size' => 10], 'post'); return CommonLogic::getVideoList($param); } //手机主题 public function theme() { return CommonLogic::theme(); } //微信支付预下单 public function getPrepayId(){ $param = $this->request->only(['type','list'],'post'); $val = Validate::rule([ 'type|购买类型'=>'require|number|in:'.CommonModel::$pay_type_service.','.CommonModel::$pay_type_shopping_good, 'list|购买列表'=>'require|array|max:100', ]); if (!$val->check($param)) throw new ValidateException($val->getError()); $val2 = Validate::rule([ 'id'=>'require|number|gt:0', 'num|购买数量'=>'require|number|max:99999999', ]); foreach ($param['list'] as $list){ if($val2->check($list)) throw new ValidateException($val2->getError()); } return CommonLogic::getPrepayId($param); } }