wupengfei 2 years ago
parent
commit
293f3bd365
3 changed files with 5 additions and 4 deletions
  1. 1 2
      .idea/workspace.xml
  2. 2 1
      application/api/controller/Qc.php
  3. 2 1
      application/common.php

+ 1 - 2
.idea/workspace.xml

@@ -4,7 +4,6 @@
     <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/Qc.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Qc.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/VideoDemand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/VideoDemand.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -191,7 +190,7 @@
       <workItem from="1668991533353" duration="2596000" />
       <workItem from="1669429338320" duration="861000" />
       <workItem from="1669448616248" duration="5065000" />
-      <workItem from="1669597148644" duration="15750000" />
+      <workItem from="1669597148644" duration="15996000" />
     </task>
     <servers />
   </component>

+ 2 - 1
application/api/controller/Qc.php

@@ -10,7 +10,8 @@ class Qc extends Base {
 
     public function index()
     {
-        getVideoTime('3d15d4704a064033a6e9167874f9fdb5');
+       $res = getVideoTime('3d15d4704a064033a6e9167874f9fdb5');
+       var_dump($res);
     }
 
 

+ 2 - 1
application/common.php

@@ -353,7 +353,8 @@ function encryptStr($str,$key,$base64 = true)
 function getVideoTime($ali_id)
 {
     $res = (new \app\api\controller\VideoDemand())->getVideoInfo($ali_id);
-    var_dump($res);
+    if(empty($res['videoBase'])) return ['duration'=>0 ,'duration_str'=>''];
+    return ['duration'=>$res['videoBase']['duration'] ,'duration_str'=>get_stay_time($res['videoBase']['duration'])];
 }