wupengfei 2 năm trước cách đây
mục cha
commit
5343d99bfc

+ 2 - 0
.idea/workspace.xml

@@ -4,6 +4,8 @@
     <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" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />

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

@@ -16,7 +16,6 @@ class Qc extends Base {
     public function index()
     {
         var_dump(getVideoTime('72fd58d8385f44369b071a81e24133c4'));
-
         die();
 
         header('content-type:text/html;charset=utf-8');

+ 4 - 2
application/api/controller/VideoDemand.php

@@ -263,8 +263,10 @@ class VideoDemand extends Base
     public function getVideoInfo($ali_vid)
     {
         $client = self::createClient($this->access_key, $this->access_secret);
-        $getVideoPlayAuthRequest = new GetPlayInfoRequest(['videoId'=>$ali_vid]);
-        var_dump($ali_vid);
+        $getVideoPlayAuthRequest = new GetPlayInfoRequest([
+            'videoId'=>$ali_vid,
+            'ResultType'=>'Multiple',
+        ]);
         $runtime = new RuntimeOptions([]);
         try {
             $res =  $client->getPlayInfoWithOptions($getVideoPlayAuthRequest, $runtime);

+ 0 - 2
application/common.php

@@ -343,11 +343,9 @@ function http_post_json($url, $jsonStr,$token_res)
 
 function getVideoTime($ali_id)
 {
-    var_dump($ali_id);
     $res = (new \app\api\controller\VideoDemand())->getVideoInfo($ali_id);
     if(empty($res['videoBase'])) return ['duration'=>0 ,'duration_str'=>''];
     return ['duration'=>intval($res['videoBase']['duration']) ,'duration_str'=>get_stay_time(intval($res['videoBase']['duration']))];
-
 }