作者 lyh

gx

@@ -85,6 +85,9 @@ class CustomModuleContentController extends BaseController @@ -85,6 +85,9 @@ class CustomModuleContentController extends BaseController
85 if(!empty($v['image'])){ 85 if(!empty($v['image'])){
86 $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); 86 $v['image_link'] = getImageUrl($v['image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
87 } 87 }
  88 + if(!empty($v['og_image'])){
  89 + $v['og_image'] = getImageUrl($v['og_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']);
  90 + }
88 if(!empty($v['video'])){ 91 if(!empty($v['video'])){
89 $v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location'],$this->user['file_cdn'] ?? 0); 92 $v['video']['url'] = getFileUrl($v['video']['url'],$this->user['storage_type'] ?? 0,$this->user['project_location'],$this->user['file_cdn'] ?? 0);
90 $v['video']['video_image'] = getImageUrl($v['video']['video_image'],$this->user['storage_type'] ?? 0,$this->user['project_location']); 93 $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 @@ -552,6 +552,9 @@ class ProductController extends BaseController
552 $v['gallery'][$gallery_k] = $gallery_v; 552 $v['gallery'][$gallery_k] = $gallery_v;
553 } 553 }
554 } 554 }
  555 + if(!empty($v['og_image'])){
  556 + $v['og_image'] = getImageUrl($v['og_image'] ?? '',$this->user['storage_type'],$this->user['project_location']);
  557 + }
555 if(!empty($v['icon'])){ 558 if(!empty($v['icon'])){
556 foreach ($v['icon'] as $icon_k => $icon_v){ 559 foreach ($v['icon'] as $icon_k => $icon_v){
557 $icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0,$this->user['project_location']); 560 $icon_v = getImageUrl($icon_v,$this->user['storage_type'] ?? 0,$this->user['project_location']);
@@ -100,6 +100,7 @@ class BlogLogic extends BaseLogic @@ -100,6 +100,7 @@ class BlogLogic extends BaseLogic
100 $blogLabelLogic = new BlogLabelLogic(); 100 $blogLabelLogic = new BlogLabelLogic();
101 $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']); 101 $info['label_name'] = $blogLabelLogic->getLabelName($info['label_id']);
102 $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); 102 $info['image_link'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']);
  103 + $info['og_image'] = getImageUrl($info['og_image'],$this->user['storage_type'],$this->user['project_location']);
103 return $this->success($info); 104 return $this->success($info);
104 } 105 }
105 106
@@ -183,6 +184,12 @@ class BlogLogic extends BaseLogic @@ -183,6 +184,12 @@ class BlogLogic extends BaseLogic
183 }else{ 184 }else{
184 $param['category_id'] = ''; 185 $param['category_id'] = '';
185 } 186 }
  187 + if(isset($param['image'])){
  188 + $param['image'] = str_replace_url($param['image'] ?? '');
  189 + }
  190 + if(isset($param['og_image'])){
  191 + $param['og_image'] = str_replace_url($param['og_image'] ?? '');
  192 + }
186 if(isset($this->param['release_at']) && !empty(($this->param['release_at'])) && ($this->param['status'] == 3)){ 193 if(isset($this->param['release_at']) && !empty(($this->param['release_at'])) && ($this->param['status'] == 3)){
187 if($this->param['release_at'] < date('Y-m-d 23:59:59')){ 194 if($this->param['release_at'] < date('Y-m-d 23:59:59')){
188 $this->fail('发布时间需大于当天'); 195 $this->fail('发布时间需大于当天');