wupengfei 2 years ago
parent
commit
f16b3a2ad9
2 changed files with 4 additions and 10 deletions
  1. 1 1
      .idea/workspace.xml
  2. 3 9
      application/nutrition/controller/VideoManage.php

+ 1 - 1
.idea/workspace.xml

@@ -190,7 +190,7 @@
       <workItem from="1669429338320" duration="861000" />
       <workItem from="1669448616248" duration="5065000" />
       <workItem from="1669597148644" duration="17061000" />
-      <workItem from="1669682447842" duration="2029000" />
+      <workItem from="1669682447842" duration="2174000" />
     </task>
     <servers />
   </component>

+ 3 - 9
application/nutrition/controller/VideoManage.php

@@ -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('该账号未注册');