作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !1763
@@ -189,7 +189,7 @@ class SyncProject extends Command @@ -189,7 +189,7 @@ class SyncProject extends Command
189 if(isset($data[$param])){ 189 if(isset($data[$param])){
190 return $data[$param]; 190 return $data[$param];
191 }else{ 191 }else{
192 - return 1; 192 + return 0;
193 } 193 }
194 } 194 }
195 195
@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Aside\Collect; @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Aside\Collect;
4 4
5 use App\Enums\Common\Code; 5 use App\Enums\Common\Code;
6 use App\Http\Controllers\Aside\BaseController; 6 use App\Http\Controllers\Aside\BaseController;
7 -use App\Http\Logic\Aside\CollectLogic; 7 +use App\Http\Logic\Aside\Collect\CollectLogic;
8 8
9 9
10 /** 10 /**
@@ -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']);
1 <?php 1 <?php
2 2
3 -namespace App\Http\Logic\Aside; 3 +namespace App\Http\Logic\Aside\Collect;
4 4
5 use App\Http\Logic\Logic; 5 use App\Http\Logic\Logic;
6 use App\Models\Blog\Blog; 6 use App\Models\Blog\Blog;
@@ -16,7 +16,6 @@ class BlogCategoryLogic extends BaseLogic @@ -16,7 +16,6 @@ class BlogCategoryLogic extends BaseLogic
16 public function __construct() 16 public function __construct()
17 { 17 {
18 parent::__construct(); 18 parent::__construct();
19 -  
20 $this->model = new BlogCategoryModel(); 19 $this->model = new BlogCategoryModel();
21 $this->param = $this->requestAll; 20 $this->param = $this->requestAll;
22 } 21 }
@@ -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('发布时间需大于当天');
@@ -226,6 +226,9 @@ class CustomModuleContentLogic extends BaseLogic @@ -226,6 +226,9 @@ class CustomModuleContentLogic extends BaseLogic
226 if(isset($param['image']) && !empty($param['image'])){ 226 if(isset($param['image']) && !empty($param['image'])){
227 $param['image'] = str_replace_url($param['image']); 227 $param['image'] = str_replace_url($param['image']);
228 } 228 }
  229 + if(isset($param['og_image'])){
  230 + $param['og_image'] = str_replace_url($param['og_image'] ?? '');
  231 + }
229 if(isset($param['video'])){ 232 if(isset($param['video'])){
230 $param['video']['url'] = str_replace_url($param['video']['url']); 233 $param['video']['url'] = str_replace_url($param['video']['url']);
231 $param['video']['video_image'] = str_replace_url($param['video']['video_image']); 234 $param['video']['video_image'] = str_replace_url($param['video']['video_image']);
@@ -192,6 +192,9 @@ class NewsLogic extends BaseLogic @@ -192,6 +192,9 @@ class NewsLogic extends BaseLogic
192 if(isset($param['image'])){ 192 if(isset($param['image'])){
193 $param['image'] = str_replace_url($param['image'] ?? ''); 193 $param['image'] = str_replace_url($param['image'] ?? '');
194 } 194 }
  195 + if(isset($param['og_image'])){
  196 + $param['og_image'] = str_replace_url($param['og_image'] ?? '');
  197 + }
195 if(isset($this->param['text'])){ 198 if(isset($this->param['text'])){
196 $param['text'] = $this->handleText($this->param['text']); 199 $param['text'] = $this->handleText($this->param['text']);
197 } 200 }
@@ -357,6 +357,9 @@ class ProductLogic extends BaseLogic @@ -357,6 +357,9 @@ class ProductLogic extends BaseLogic
357 $param['thumb'] = Arr::a2s([]); 357 $param['thumb'] = Arr::a2s([]);
358 $param['gallery'] = Arr::a2s([]); 358 $param['gallery'] = Arr::a2s([]);
359 } 359 }
  360 + if(isset($param['og_image'])){
  361 + $param['og_image'] = str_replace_url($param['og_image'] ?? '');
  362 + }
360 if(isset($param['files'])){ 363 if(isset($param['files'])){
361 $param['files']['url'] = str_replace_url($param['files']['url'] ?? ''); 364 $param['files']['url'] = str_replace_url($param['files']['url'] ?? '');
362 $param['files'] = Arr::a2s($param['files'] ?? []); 365 $param['files'] = Arr::a2s($param['files'] ?? []);