소스 검색

视频分类

liuzejian 1 년 전
부모
커밋
1b0da30e59
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 0
      modules/Video/Http/Controllers/VideoController.php
  2. 4 4
      tests/UsedTestCase.php

+ 1 - 0
modules/Video/Http/Controllers/VideoController.php

@@ -50,6 +50,7 @@ class VideoController extends CatchController
             $video->shelf_type_str = $video->shelf_type == 1 ? '未上架':'上架';
             $video->update_type_str = $video->update_type == 1 ? '连载中' : '完结';
             $video->cp_share_type_str = ([1 => '分成', 2=>'保底', 3=>'买断'])[$video->cp_share_type] ?? '';
+            $video->channel = $allVideoCategory->get($video->category_id)->pid;
         }
 
         return $videos;

+ 4 - 4
tests/UsedTestCase.php

@@ -13,11 +13,11 @@ abstract class UsedTestCase extends BaseTestCase
     {
         parent::setUp(); // TODO: Change the autogenerated stub
         $tokenInfo = $this->post('http://localhost/api/login', [
-            'email' => 'catch@admin.com',
-            'password' => 'catchadmin',
+//            'email' => 'catch@admin.com',
+//            'password' => 'catchadmin',
             'remember' => false,
-//            'email' => 'xiaoli@qq.com',
-//            'password' => 'Qaz123',
+            'email' => 'xiaoli@qq.com',
+            'password' => 'catchadmin',
 //        'email' => 'aa4@test.com',
 //            'password' => '123',
         ])->json();