作者 李宇航

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

Lyh server



查看合并请求 !1763
... ... @@ -189,7 +189,7 @@ class SyncProject extends Command
if(isset($data[$param])){
return $data[$param];
}else{
return 1;
return 0;
}
}
... ...
... ... @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Aside\Collect;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Http\Logic\Aside\CollectLogic;
use App\Http\Logic\Aside\Collect\CollectLogic;
/**
... ...
... ... @@ -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']);
... ...
<?php
namespace App\Http\Logic\Aside;
namespace App\Http\Logic\Aside\Collect;
use App\Http\Logic\Logic;
use App\Models\Blog\Blog;
... ...
... ... @@ -16,7 +16,6 @@ class BlogCategoryLogic extends BaseLogic
public function __construct()
{
parent::__construct();
$this->model = new BlogCategoryModel();
$this->param = $this->requestAll;
}
... ...
... ... @@ -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('发布时间需大于当天');
... ...
... ... @@ -226,6 +226,9 @@ class CustomModuleContentLogic extends BaseLogic
if(isset($param['image']) && !empty($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($param['video'])){
$param['video']['url'] = str_replace_url($param['video']['url']);
$param['video']['video_image'] = str_replace_url($param['video']['video_image']);
... ...
... ... @@ -192,6 +192,9 @@ class NewsLogic extends BaseLogic
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['text'])){
$param['text'] = $this->handleText($this->param['text']);
}
... ...
... ... @@ -357,6 +357,9 @@ class ProductLogic extends BaseLogic
$param['thumb'] = Arr::a2s([]);
$param['gallery'] = Arr::a2s([]);
}
if(isset($param['og_image'])){
$param['og_image'] = str_replace_url($param['og_image'] ?? '');
}
if(isset($param['files'])){
$param['files']['url'] = str_replace_url($param['files']['url'] ?? '');
$param['files'] = Arr::a2s($param['files'] ?? []);
... ...