浏览代码

视频分类

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();