作者 刘锟

项目升级

... ... @@ -122,6 +122,7 @@ class ProjectUpdate extends Command
$id = $model->addReturnId([
'project_id' => $project_id,
'title' => $item['ttile'],
'intro' => '',
'content' => $item['content'],
'thumb' => isset($gallery[0]) ? Arr::a2s($gallery[0]) : '',
'gallery' => Arr::a2s($gallery),
... ... @@ -129,7 +130,8 @@ class ProjectUpdate extends Command
'title' => '',
'keyword' => '',
'description' => ''
])
]),
'status' => Product::STATUS_ON
]);
$route = RouteMap::setRoute($item['ttile'], RouteMap::SOURCE_PRODUCT, $id, $project_id);
$model->edit(['route' => $route], ['id' => $id]);
... ...
... ... @@ -512,7 +512,9 @@ if (!function_exists('str_replace_url')) {
*/
function str_replace_url($url)
{
if(!empty($url)){
$cos = config('filesystems.disks.cos');
$cosCdn = $cos['cdn'];
if($url && strpos($url,$cosCdn) === false){
// 使用 parse_url 函数来解析 URL
$urlParts = parse_url($url);
// 检查是否存在 host(域名)部分
... ...