作者 刘锟

项目升级

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