wupengfei 2 yıl önce
ebeveyn
işleme
64c50a9883

+ 5 - 3
.idea/workspace.xml

@@ -3,6 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Upload.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Upload.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Video.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Video.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -148,7 +150,7 @@
       <workItem from="1659142083201" duration="7063000" />
       <workItem from="1659316309094" duration="8261000" />
       <workItem from="1659401482776" duration="4587000" />
-      <workItem from="1659416262839" duration="3211000" />
+      <workItem from="1659416262839" duration="5285000" />
     </task>
     <servers />
   </component>
@@ -200,9 +202,9 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1058" y="441" width="617" height="490" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1658828723311" />
-    <state x="1237" y="368" width="672" height="678" key="search.everywhere.popup" timestamp="1658834953550">
+    <state x="1237" y="368" width="672" height="678" key="search.everywhere.popup" timestamp="1659421292486">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1237" y="368" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1658834953550" />
+    <state x="1237" y="368" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1659421292486" />
   </component>
 </project>

+ 2 - 2
application/api/controller/Upload.php

@@ -50,8 +50,8 @@ class Upload extends Base
      */
     public function upload()
     {
-        var_dump(  $this->request->file('file'));
-        die();
+      //  var_dump(  $this->request->file('file'));
+       // die();
 
         if (!($file = $this->getUploadFile()) || empty($file)) {
             $this->error('文件上传异常,文件可能过大或未上传!');

+ 3 - 3
application/api/controller/Video.php

@@ -135,7 +135,7 @@ class Video extends Base
             ->limit($this->off_set,$this->page_num)->select()->toArray();
         array_walk($list,function (&$v,$k){
             $v['is_collect'] = UserCollect::checkCollectByType($this->user_id,1,$v['id']);
-            $v['label_name'] = [$v['label']];
+            $v['label_name'] = explode(',',trim(',',$v['label']));
             $v['read_num']  = array_sum(array_column($v['video_arr'],'read_num'));
         });
 
@@ -179,7 +179,7 @@ class Video extends Base
         if($detail['is_deleted'] == 1 || $detail['status'] == 0)$this->error('该视频已下线');
         $detail['label_name'] = [];
         if($detail['label']) {
-            $detail['label_name'] = [$detail['label']];
+            $detail['label_name'] = explode(',',trim(',',$detail['label']));
         }
         $level_id = UserLevelRank::getUserVip($this->user_id);
         foreach ($detail['video_arr'] as &$dv) {
@@ -373,7 +373,7 @@ class Video extends Base
         if($detail['is_deleted'] == 1) $this->error('视频已删除');
         $detail['label_name'] = [];
         if($detail['label']) {
-            $detail['label_name'] = [$detail['label']];
+            $detail['label_name'] =explode(',',trim(',',$detail['label']));
         }
         $this->success('获取成功',['detail'=>$detail]);
     }