xielin 5 년 전
부모
커밋
56661262ad
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      app/Repositories/PostRepositories.php
  2. 1 0
      app/Service/AliYunVodService.php

+ 4 - 3
app/Repositories/PostRepositories.php

@@ -111,13 +111,14 @@ class PostRepositories
         if(isset($request['video']) && $request['video']){
             for($i=0;$i<3;$i++){
                 $videoUrl = $this->aliYunVodService->getPlayUrlByVideoId($request['video']);
+                Log::debug('video-url:'.$videoUrl);
                 if($videoUrl){
                     break;
                 }
             }
-        }
-        if(empty($videoUrl)){
-            return jsonError('发布失败,请重试');
+            if(empty($videoUrl)){
+                return jsonError('发布失败,请重试');
+            }
         }
 
         $data = [

+ 1 - 0
app/Service/AliYunVodService.php

@@ -14,6 +14,7 @@ class AliYunVodService
         try {
             $client = $this->initVodClient(config('aliyunvod.vod.AccessKeyID'), config('aliyunvod.vod.AccessKeySecret'));
             $playInfo = $this->getPlayInfo($client, $videoId);
+            var_dump($playInfo);
             if($playInfo && is_object($playInfo)){
                 return $playInfo->PlayInfoList->PlayInfo[0]->PlayURL;
             }else{