request->isAjax()) { $get = $this->request->get(); $lists = TrainingLogic::lists($get); $this->_success('',$lists); } return $this->fetch(); } public function setlistadd(){ if ($this->request->isAjax()) { $post = $this->request->post(); $add = TrainingLogic::setlistadd($post); $this->_success('增加成功'); } return $this->fetch(); } public function setlistedit(){ if ($this->request->isAjax()) { $post = $this->request->post(); $add = TrainingLogic::seteidt($post); $this->_success('增加成功'); } $get = $this->request->get('id'); $setlistinfo = TrainingLogic::setlistinfo($get); $this->assign('detail',$setlistinfo); return $this->fetch(); } public function setlistdel(){ $id = $this->request->post('id'); $list= Db::name('video_type')->where('id',$id)->delete(); $this->_success('删除成功'); } //视频播放列表 public function video(){ if ($this->request->isAjax()) { $get = $this->request->get(); $lists = TrainingLogic::video_lists($get); $this->_success('获取数据成功',$lists); } $this->assign('category_list',TrainingLogic::setlist()); return $this->fetch(); } public function add(){ if ($this->request->isAjax()) { $post = $this->request->post(); $add = TrainingLogic::add($post); $this->_success('增加成功'); } $this->assign('category_list',TrainingLogic::setlist()); return $this->fetch(); } public function edits(){ if ($this->request->isAjax()) { $post = $this->request->post(); $edits = TrainingLogic::edits($post); $this->_success('修改成功'); } $get = $this->request->get('id'); $this->assign('info',TrainingLogic::videoinfo($get)); $this->assign('category_list',TrainingLogic::setlist()); return $this->fetch(); } public function dels(){ $post = $this->request->post('id'); $del=Db::name('video')->where('id',$post)->delete(); $this->_success('删除成功'); } }