作者 lyh

gx

@@ -460,7 +460,7 @@ if (!function_exists('getImageUrl')) { @@ -460,7 +460,7 @@ if (!function_exists('getImageUrl')) {
460 if(is_array($path)){ 460 if(is_array($path)){
461 $url =[]; 461 $url =[];
462 foreach ($path as $v){ 462 foreach ($path as $v){
463 - $url[] = getImageUrl($v); 463 + $url[] = getImageUrl($v,$location,$storage_type);
464 } 464 }
465 }else{ 465 }else{
466 if(empty($path)){ 466 if(empty($path)){
@@ -496,7 +496,7 @@ if (!function_exists('getFileUrl')) { @@ -496,7 +496,7 @@ if (!function_exists('getFileUrl')) {
496 if(is_array($path)){ 496 if(is_array($path)){
497 $url =[]; 497 $url =[];
498 foreach ($path as $v){ 498 foreach ($path as $v){
499 - $url[] = getFileUrl($v); 499 + $url[] = getFileUrl($v,$location,$storage_type);
500 } 500 }
501 }else{ 501 }else{
502 if(empty($path)){ 502 if(empty($path)){
@@ -335,7 +335,7 @@ class FileController @@ -335,7 +335,7 @@ class FileController
335 $fileModel = new File(); 335 $fileModel = new File();
336 $lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']); 336 $lists = $fileModel->list($this->map,'id',['id','hash','type','path','created_at','name']);
337 foreach ($lists as $k => $v){ 337 foreach ($lists as $k => $v){
338 - $v['file_link'] = getFileUrl($v['path']); 338 + $v['file_link'] = getFileUrl($v['path'],$this->cache['project_location'] ?? 1,$this->cache['storage_type'] ?? 0);
339 $lists[$k] = $v; 339 $lists[$k] = $v;
340 } 340 }
341 $this->response('success',Code::SUCCESS,$lists); 341 $this->response('success',Code::SUCCESS,$lists);
@@ -425,7 +425,7 @@ class ImageController extends Controller @@ -425,7 +425,7 @@ class ImageController extends Controller
425 public function responseData($path = '', $name = ''){ 425 public function responseData($path = '', $name = ''){
426 $data = [ 426 $data = [
427 'image'=>$path, 427 'image'=>$path,
428 - 'image_link'=>getImageUrl($path), 428 + 'image_link'=>getImageUrl($path,$this->cache['project_location'] ?? 1,$this->cache['storage_type'] ?? 0),
429 'name'=>$name, 429 'name'=>$name,
430 'image_download'=>url('a/download_images?path='.$path) 430 'image_download'=>url('a/download_images?path='.$path)
431 ]; 431 ];