作者 lyh

gx关闭项目理由

... ... @@ -530,16 +530,18 @@ class UpdateRoute extends Command
$seoModel = new WebSettingSeo();
$seo_info = $seoModel->read(['project_id'=>$project_id]);
if($seo_info !== false){
$prefix = $seo_info['product_category_prefix'] ?? [];
$suffix = $seo_info['product_category_suffix'] ?? [];
$prefix = [];
$suffix = [];
if(!empty($seo_info['product_cate_prefix'])){
$prefix[] = ['name'=>$seo_info['product_cate_prefix']];
$prefix[] = ['val'=>[$seo_info['product_cate_prefix']],'level'=>1];
}
if(!empty($seo_info['product_cate_suffix'])){
$suffix[] = ['name'=>$seo_info['product_cate_suffix']];
$suffix[] = ['val'=>[$seo_info['product_cate_suffix']],'level'=>1];
}
if(!empty($prefix) && !empty($suffix)){
$seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);
}
}
return true;
}
}
... ...