作者 lyh

gx脚本锚文本数量

@@ -68,12 +68,19 @@ class AggregationSettingController extends BaseController @@ -68,12 +68,19 @@ class AggregationSettingController extends BaseController
68 if($number > 1){ 68 if($number > 1){
69 $this->param['top_banner'] = array_slice($this->param['top_banner'], 1); 69 $this->param['top_banner'] = array_slice($this->param['top_banner'], 1);
70 } 70 }
  71 + }else{
  72 + if(empty($info['image'])){
  73 + $settingImageModel->edit(['image'=>reset($this->param['top_banner'])],['type'=>4,'project_id'=>$this->user['project_id']]);
  74 + if($number > 1){
  75 + $this->param['top_banner'] = array_slice($this->param['top_banner'], 1);
  76 + }
  77 + }
71 } 78 }
72 if($number > 3){ 79 if($number > 3){
73 $this->param['top_banner'] = array_slice($this->param['top_banner'], 0, 3); 80 $this->param['top_banner'] = array_slice($this->param['top_banner'], 0, 3);
74 } 81 }
75 - $this->param['top_banner'] = Arr::a2s($this->param['top_banner']);  
76 } 82 }
  83 + $this->param['top_banner'] = Arr::a2s($this->param['top_banner'] ?? []);
77 if(isset($this->param['foot_banner']) && !empty($this->param['foot_banner'])){ 84 if(isset($this->param['foot_banner']) && !empty($this->param['foot_banner'])){
78 $this->param['foot_banner'] = Arr::a2s($this->param['foot_banner']); 85 $this->param['foot_banner'] = Arr::a2s($this->param['foot_banner']);
79 } 86 }