|
...
|
...
|
@@ -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);
|
|
|
|
}
|
|
...
|
...
|
@@ -330,7 +330,7 @@ class ProductController extends BaseController |
|
|
|
$arr = json_decode($info['values']);
|
|
|
|
foreach ($arr as $k1=>$v1){
|
|
|
|
$v1 = (array)$v1;
|
|
|
|
$v1['url'] = getImageUrl($v1['url'],$this->user['storage_type']);
|
|
|
|
$v1['url'] = getImageUrl($v1['url'],$this->user['storage_type'],$this->user['project_location']);
|
|
|
|
$arr[$k1] = $v1;
|
|
|
|
}
|
|
|
|
$v['values'] = $arr;
|
|
...
|
...
|
@@ -339,9 +339,9 @@ class ProductController extends BaseController |
|
|
|
foreach ($arr1 as $k1=>$v1){
|
|
|
|
$v1 = (array)$v1;
|
|
|
|
if(isset($v1['url'])){
|
|
|
|
$v1['url'] = getFileUrl($v1['url'],$this->user['storage_type']);
|
|
|
|
$v1['url'] = getFileUrl($v1['url'],$this->user['storage_type'],$this->user['project_location']);
|
|
|
|
}else{
|
|
|
|
$v1 = getFileUrl($v1,$this->user['storage_type']);
|
|
|
|
$v1 = getFileUrl($v1,$this->user['storage_type'],$this->user['project_location']);
|
|
|
|
}
|
|
|
|
$arr1[$k1] = $v1;
|
|
|
|
}
|
...
|
...
|
|