|
...
|
...
|
@@ -620,7 +620,7 @@ class ProductLogic extends BaseLogic |
|
|
|
$img_arr = explode(',',$data[7]);
|
|
|
|
foreach ($img_arr as $v_img){
|
|
|
|
if($v_img){
|
|
|
|
$one_img = CosService::uploadRemote($project_id,'image_product',$v_img);
|
|
|
|
$one_img = check_remote_url_down($v_img) ? CosService::uploadRemote($project_id,'image_product',$v_img) : $v_img;
|
|
|
|
if($one_img){
|
|
|
|
$one_gallery = [
|
|
|
|
'alt' => '这是一张产品图',
|
|
...
|
...
|
@@ -643,7 +643,7 @@ class ProductLogic extends BaseLogic |
|
|
|
preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[5], $result_intro);
|
|
|
|
if($result_intro[2]??[]){
|
|
|
|
foreach ($result_intro[2] as $vi_img){
|
|
|
|
$data[5] = str_replace($vi_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vi_img)),$data[5]);
|
|
|
|
check_remote_url_down($vi_img) && $data[5] = str_replace($vi_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vi_img)),$data[5]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -651,7 +651,7 @@ class ProductLogic extends BaseLogic |
|
|
|
preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[5], $result_intro_video);
|
|
|
|
if($result_intro_video[2]??[]){
|
|
|
|
foreach ($result_intro_video[2] as $vi_video){
|
|
|
|
$data[5] = str_replace($vi_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vi_video)),$data[5]);
|
|
|
|
check_remote_url_down($vi_video) && $data[5] = str_replace($vi_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vi_video)),$data[5]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -664,7 +664,7 @@ class ProductLogic extends BaseLogic |
|
|
|
preg_match_all('/<img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[6], $result_content);
|
|
|
|
if($result_content[2]??[]){
|
|
|
|
foreach ($result_content[2] as $vc_img){
|
|
|
|
$data[6] = str_replace($vc_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vc_img)),$data[6]);
|
|
|
|
check_remote_url_down($vc_img) && $data[6] = str_replace($vc_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vc_img)),$data[6]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -672,7 +672,7 @@ class ProductLogic extends BaseLogic |
|
|
|
preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $data[6], $result_content_video);
|
|
|
|
if($result_content_video[2]??[]){
|
|
|
|
foreach ($result_content_video[2] as $vc_video){
|
|
|
|
$data[6] = str_replace($vc_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vc_video)),$data[6]);
|
|
|
|
check_remote_url_down($vc_video) && $data[6] = str_replace($vc_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vc_video)),$data[6]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -698,7 +698,7 @@ class ProductLogic extends BaseLogic |
|
|
|
|
|
|
|
if($result_desc[2]??[]){
|
|
|
|
foreach ($result_desc[2] as $vdesc_img){
|
|
|
|
$v_desc['text'] = str_replace($vdesc_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vdesc_img)),$v_desc['text']);
|
|
|
|
check_remote_url_down($vdesc_img) && $v_desc['text'] = str_replace($vdesc_img,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vdesc_img)),$v_desc['text']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -706,7 +706,7 @@ class ProductLogic extends BaseLogic |
|
|
|
preg_match_all('/<source\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i', $v_desc['text'], $result_desc_video);
|
|
|
|
if($result_desc_video[2]??[]){
|
|
|
|
foreach ($result_desc_video[2] as $vdesc_video){
|
|
|
|
$v_desc['text'] = str_replace($vdesc_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vdesc_video)),$v_desc['text']);
|
|
|
|
check_remote_url_down($vdesc_video) && $v_desc['text'] = str_replace($vdesc_video,getImageUrl(CosService::uploadRemote($project_id,'image_product',$vdesc_video)),$v_desc['text']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|