作者 lyh

gx关闭项目理由

@@ -530,15 +530,17 @@ class UpdateRoute extends Command @@ -530,15 +530,17 @@ class UpdateRoute extends Command
530 $seoModel = new WebSettingSeo(); 530 $seoModel = new WebSettingSeo();
531 $seo_info = $seoModel->read(['project_id'=>$project_id]); 531 $seo_info = $seoModel->read(['project_id'=>$project_id]);
532 if($seo_info !== false){ 532 if($seo_info !== false){
533 - $prefix = $seo_info['product_category_prefix'] ?? [];  
534 - $suffix = $seo_info['product_category_suffix'] ?? []; 533 + $prefix = [];
  534 + $suffix = [];
535 if(!empty($seo_info['product_cate_prefix'])){ 535 if(!empty($seo_info['product_cate_prefix'])){
536 - $prefix[] = ['name'=>$seo_info['product_cate_prefix']]; 536 + $prefix[] = ['val'=>[$seo_info['product_cate_prefix']],'level'=>1];
537 } 537 }
538 if(!empty($seo_info['product_cate_suffix'])){ 538 if(!empty($seo_info['product_cate_suffix'])){
539 - $suffix[] = ['name'=>$seo_info['product_cate_suffix']]; 539 + $suffix[] = ['val'=>[$seo_info['product_cate_suffix']],'level'=>1];
  540 + }
  541 + if(!empty($prefix) && !empty($suffix)){
  542 + $seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);
540 } 543 }
541 - $seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);  
542 } 544 }
543 return true; 545 return true;
544 } 546 }