作者 lyh

gx

... ... @@ -459,7 +459,13 @@ if (!function_exists('getFileUrl')) {
$fileModel = new File();
$info = $fileModel->read(['hash'=>$hash]);
if(!empty($info)){
$url = url('a/file/'.$info['hash']);
if($info['is_cos'] == 1){
$cos = config('filesystems.disks.cos');
$cosCdn = $cos['cdn'];
$url = $cosCdn.$info['path'];
}else{
$url = url('a/file/'.$info['hash']);
}
}else{
$url = $hash;
}
... ...