Przeglądaj źródła

后台自己传视频缩略图,和点播id

lizhen_gitee 4 miesięcy temu
rodzic
commit
797682ddd0
1 zmienionych plików z 9 dodań i 8 usunięć
  1. 9 8
      application/api/controller/Subject.php

+ 9 - 8
application/api/controller/Subject.php

@@ -47,17 +47,18 @@ class Subject extends Api
         //选手列表
         $lists = Db::name('vote_player')
             ->where($map)->order('votes desc,id desc')->autopage()->select();
+        $lists = list_domain_image($lists,['thumb_image']);
 
-        foreach($lists as $key => $val){
+        /*foreach($lists as $key => $val){
             $val['video_file'] = localpath_to_netpath($val['video_file']);
 
-            $val['video_thumb'] = '';
+            $val['thumb_image'] = '';
             if(!empty($val['video_file'])){
-                $val['video_thumb'] = $val['video_file'].'?x-oss-process=video/snapshot,t_0,m_fast,f_jpg';
+                $val['thumb_image'] = $val['video_file'].'?x-oss-process=video/snapshot,t_0,m_fast,f_jpg';
             }
 
             $lists[$key] = $val;
-        }
+        }*/
 
         //$lists = $this->mingci($subject_id,$lists);
 
@@ -76,12 +77,12 @@ class Subject extends Api
         ];
 
         $info = Db::name('vote_player')->where($map)->find();
-
-        $info['video_thumb'] = '';
+        $info = info_domain_image($info,['thumb_image']);
+        /*$info['thumb_image'] = '';
         if(!empty($info['video_file'])){
             $info['video_file']  = localpath_to_netpath($info['video_file']);
-            $info['video_thumb'] = $info['video_file'].'?x-oss-process=video/snapshot,t_0,m_fast,f_jpg';
-        }
+            $info['thumb_image'] = $info['video_file'].'?x-oss-process=video/snapshot,t_0,m_fast,f_jpg';
+        }*/
 
         //获取播放地址和秒数
         $videoVod = new \app\common\library\Video();