request->only([ 'page' => 1, 'size' => 10, 'status' => '', 'video_sn' => '', 'video_name' => '', 'video_url' => '', ], 'post'); return VideoLogic::videoList($param); } //添加视频 public function videoAdd() { $param = $this->request->only([ 'video_name', 'video_url', 'video_img', 'weight' => '', 'remark' => '', ], 'post'); $val = Validate::rule(Config::get('validate_rules.videoAdd')); if (!$val->check($param)) throw new ValidateException($val->getError()); return VideoLogic::videoAdd($param); } //读取视频详情 public function videoRead() { $id = $this->request->post('id/d', 0); return VideoLogic::videoRead($id); } //编辑视频 public function videoEdit() { $param = $this->request->only([ 'id', 'video_name', 'video_url', 'video_img', 'weight' => '', 'remark' => '', ], 'post'); $val = Validate::rule(Config::get('validate_rules.videoEdit')); if (!$val->check($param)) throw new ValidateException($val->getError()); return VideoLogic::videoEdit($param); } //视频启禁用 public function videoChange() { $param = $this->request->only(['id', 'status',], 'post'); $val = Validate::rule(Config::get('validate_rules.status')); if (!$val->check($param)) throw new ValidateException($val->getError()); return VideoLogic::videoChange($param); } //删除视频 public function videoDelete() { halt($this->request->uid,$this->request->uname,$this->request->roleid); $id = $this->request->post('id/d', 0); return VideoLogic::videoDelete($id); } }