作者 lyh

gx

... ... @@ -85,6 +85,9 @@ class CustomModuleContentController extends BaseController
if(!empty($v['image'])){
$v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
}
if(!empty($v['og_image'])){
$v['og_image'] = getImageUrl($v['og_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
}
if(!empty($v['video'])){
$v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location'],$this->user['file_cdn'] ?? 0);
$v['video']['video_image'] = getImageUrl($v['video']['video_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
... ...
... ... @@ -552,6 +552,9 @@ class ProductController extends BaseController
$v['gallery'][$gallery_k] = $gallery_v;
}
}
if(!empty($v['og_image'])){
$v['og_image'] = getImageUrl($v['og_image'] ?? '',$this->user['storage_type'],$this->user['project_location']);
}
if(!empty($v['icon'])){
foreach ($v['icon'] as $icon_k => $icon_v){
$icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0,$this->user['project_location']);
... ...
... ... @@ -100,6 +100,7 @@ class BlogLogic extends BaseLogic
$blogLabelLogic = new BlogLabelLogic();
$info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']);
$info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']);
$info['og_image'] = getImageUrl($info['og_image'],$this->user['storage_type'],$this->user['project_location']);
return $this->success($info);
}
... ... @@ -183,6 +184,12 @@ class BlogLogic extends BaseLogic
}else{
$param['category_id'] = '';
}
if(isset($param['image'])){
$param['image'] = str_replace_url($param['image'] ?? '');
}
if(isset($param['og_image'])){
$param['og_image'] = str_replace_url($param['og_image'] ?? '');
}
if(isset($this->param['release_at']) && !empty(($this->param['release_at'])) && ($this->param['status'] == 3)){
if($this->param['release_at'] < date('Y-m-d 23:59:59')){
$this->fail('发布时间需大于当天');
... ...