Browse Source

作品列表随机排序

lizhen_gitee 3 months ago
parent
commit
6f90ed73f0
1 changed files with 1 additions and 12 deletions
  1. 1 12
      application/api/controller/Subject.php

+ 1 - 12
application/api/controller/Subject.php

@@ -47,21 +47,10 @@ class Subject extends Api
 
         //选手列表
         $lists = Db::name('vote_player')
-            ->where($map)->order('votes desc,id desc')->autopage()->select();
+            ->where($map)->orderRaw('RAND()')->autopage()->select();
         $lists = list_domain_image($lists,['thumb_image']);
 
-        /*foreach($lists as $key => $val){
-            $val['video_file'] = localpath_to_netpath($val['video_file']);
-
-            $val['thumb_image'] = '';
-            if(!empty($val['video_file'])){
-                $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);
 
         $this->success(1,$lists);
     }