123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\admin\controller;
- use app\admin\logic\VideoGroupLogic;
- use app\BaseController;
- use think\exception\ValidateException;
- use think\facade\Config;
- use think\facade\Validate;
- //批量设置视频
- class VideoGroup extends BaseController
- {
- //列表
- public function list()
- {
- $param = $this->request->only([
- 'page' => 1,
- 'size' => 10,
- 'company_title' => '',
- 'card_title' => '',
- 'code' => '',
- 'start_date' => '',
- 'end_date' => '',
- ], 'post');
- return VideoGroupLogic::list($param);
- }
- //添加
- public function add()
- {
- $param = $this->request->only(['group_id', 'video_ids'], 'post');
- $val = Validate::rule(Config::get('validate_rules.videoGroupAdd'));
- if (!$val->check($param)) throw new ValidateException($val->getError());
- return VideoGroupLogic::add($param);
- }
- }
|