|
@@ -161,7 +161,7 @@ class VideoManage extends Controller
|
|
|
protected function _form_filter(&$data)
|
|
|
{
|
|
|
if($this->request->isGet()){
|
|
|
- $data['type'] = 2;
|
|
|
+ $data['up_type'] = 2;
|
|
|
$all_cate = VCM::where(['is_deleted'=>0])->order('sort desc ,id desc')->select();
|
|
|
$this->r = input('get.r',0);
|
|
|
$this->cate_tree = make_tree($all_cate);
|
|
@@ -185,20 +185,14 @@ class VideoManage extends Controller
|
|
|
}
|
|
|
|
|
|
if($this->request->isPost()) {
|
|
|
-
|
|
|
+ $data['up_type'] = 2;
|
|
|
if($data['up_type'] == 1){
|
|
|
$data['url'] = $data['up_url'];
|
|
|
}else{
|
|
|
$data['url'] = $data['path'];
|
|
|
}
|
|
|
- $data['type'] = 2;
|
|
|
- if($data['type'] == 1){
|
|
|
- if( !$data['url']) $this->error('请上传视频');
|
|
|
- }else{
|
|
|
- $item_title = input('post.ali_vid');
|
|
|
- if(empty($item_title)) $this->error('请上传视频');
|
|
|
- }
|
|
|
if(empty($data['cover'])) $this->error('请上传视频封面');
|
|
|
+ if(empty($data['ali_vid'])) $this->error('云点播ID不能为空');
|
|
|
if(!empty($data['phone'])) {
|
|
|
$user_id = User::where('phone|email',$data['phone'])->value('id');
|
|
|
if(!$user_id) $this->error('该账号未注册');
|