wesmiler пре 2 година
родитељ
комит
d41a2d22c0
2 измењених фајлова са 2 додато и 17 уклоњено
  1. 1 15
      app/Http/Controllers/Api/v1/VideoController.php
  2. 1 2
      app/Services/Api/VideoService.php

+ 1 - 15
app/Http/Controllers/Api/v1/VideoController.php

@@ -45,21 +45,7 @@ class VideoController extends webApp
             $type = request()->post('type', 1);
             // 我的视频
             $datas = [];
-            if($type == 1){
-                $datas = VideoService::make()->getDataList($params, $pageSize,'', $this->userId);
-            }
-            // 喜欢的视频
-            else if ($type == 2){
-
-            }
-            // 收藏的视频
-            else if ($type == 3){
-
-            }
-            // 观看历史
-            else if ($type == 4){
-
-            }
+            $datas = VideoService::make()->getDataList($params, $pageSize,'', $this->userId);
 
             return showJson(1010, true, $datas);
         } catch (\Exception $exception){

+ 1 - 2
app/Services/Api/VideoService.php

@@ -61,7 +61,7 @@ class VideoService extends BaseService
     public function getDataList($params, $pageSize = 18, $field = '', $userId=0)
     {
 
-        $where = ['a.mark' => 1,'a.is_sort'=>2,'b.mark'=>1];
+        $where = ['a.mark' => 1,'a.is_short'=>2,'b.mark'=>1];
         $field = $field? $field : 'lev_a.*';
         $order = 'lev_a.id desc';
         $list = $this->model->with(['member'])->from('videos as a')
@@ -85,7 +85,6 @@ class VideoService extends BaseService
                             $query->whereIn('a.id', $ids);
                         }
                     }
-//                    $query->where('a.type', $type);
                 }
 
                 $uid = isset($params['uid']) ? $params['uid'] : 0;