|
...
|
...
|
@@ -78,25 +78,25 @@ class ProductController extends BaseController |
|
|
|
public function getHandleFileImage($v){
|
|
|
|
//ToDo::处理图片及文件
|
|
|
|
if(!empty($v['thumb']) && !empty($v['thumb']['url'])){
|
|
|
|
$v['thumb']['url'] = getImageUrl($v['thumb']['url'],$this->user['storage_type'] ?? 0);
|
|
|
|
$v['thumb']['url'] = getImageUrl($v['thumb']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
}
|
|
|
|
if(!empty($v['gallery'])){
|
|
|
|
foreach ($v['gallery'] as $gallery_k => $gallery_v){
|
|
|
|
$gallery_v['url'] = getImageUrl($gallery_v['url'],$this->user['storage_type'] ?? 0);
|
|
|
|
$gallery_v['url'] = getImageUrl($gallery_v['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
$v['gallery'][$gallery_k] = $gallery_v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!empty($v['icon'])){
|
|
|
|
foreach ($v['icon'] as $icon_k => $icon_v){
|
|
|
|
$icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0);
|
|
|
|
$icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
$v['icon'][$icon_k] = $icon_v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!empty($v['video']) && !empty($v['video']['url'])){
|
|
|
|
$v['video']['url'] = getImageUrl($v['video']['url'],$this->user['storage_type'] ?? 0);
|
|
|
|
$v['video']['url'] = getImageUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
}
|
|
|
|
if(!empty($v['files']) && !empty($v['files']['url'])){
|
|
|
|
$v['files']['url'] = getImageUrl($v['files']['url'],$this->user['storage_type'] ?? 0);
|
|
|
|
$v['files']['url'] = getImageUrl($v['files']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
|
|
|
|
}
|
|
|
|
return $this->success($v);
|
|
|
|
}
|
...
|
...
|
|