作者 lyh

gx

@@ -459,7 +459,13 @@ if (!function_exists('getFileUrl')) { @@ -459,7 +459,13 @@ if (!function_exists('getFileUrl')) {
459 $fileModel = new File(); 459 $fileModel = new File();
460 $info = $fileModel->read(['hash'=>$hash]); 460 $info = $fileModel->read(['hash'=>$hash]);
461 if(!empty($info)){ 461 if(!empty($info)){
462 - $url = url('a/file/'.$info['hash']); 462 + if($info['is_cos'] == 1){
  463 + $cos = config('filesystems.disks.cos');
  464 + $cosCdn = $cos['cdn'];
  465 + $url = $cosCdn.$info['path'];
  466 + }else{
  467 + $url = url('a/file/'.$info['hash']);
  468 + }
463 }else{ 469 }else{
464 $url = $hash; 470 $url = $hash;
465 } 471 }