作者 lyh

gx

@@ -302,8 +302,8 @@ class BTemplateLogic extends BaseLogic @@ -302,8 +302,8 @@ class BTemplateLogic extends BaseLogic
302 'head_css'=>$param['head_css'], 302 'head_css'=>$param['head_css'],
303 'footer_html'=>$param['footer_html'], 303 'footer_html'=>$param['footer_html'],
304 'footer_css'=>$param['footer_css'], 304 'footer_css'=>$param['footer_css'],
305 - 'other'=>str_replace('<header','',characterTruncation($param['html'],"/<link id=\"google-fonts-link\"(.*?)<header/s")),  
306 ]; 305 ];
  306 + $other = str_replace('<header','',characterTruncation($param['html'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));
307 if($info === false){ 307 if($info === false){
308 $data['template_id'] = $param['template_id']; 308 $data['template_id'] = $param['template_id'];
309 $data['project_id'] = $this->user['project_id']; 309 $data['project_id'] = $this->user['project_id'];
@@ -312,6 +312,8 @@ class BTemplateLogic extends BaseLogic @@ -312,6 +312,8 @@ class BTemplateLogic extends BaseLogic
312 }else{ 312 }else{
313 $templateCommonModel->edit($data,['id'=>$info['id']]); 313 $templateCommonModel->edit($data,['id'=>$info['id']]);
314 } 314 }
  315 + //更新所有界面的other
  316 + $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id']]);
315 return $this->success(); 317 return $this->success();
316 } 318 }
317 319
@@ -122,8 +122,8 @@ class CustomTemplateLogic extends BaseLogic @@ -122,8 +122,8 @@ class CustomTemplateLogic extends BaseLogic
122 'head_css'=>characterTruncation($html,'/<style id="globalsojs-header">(.*?)<\/style>/s'), 122 'head_css'=>characterTruncation($html,'/<style id="globalsojs-header">(.*?)<\/style>/s'),
123 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'), 123 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'),
124 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'), 124 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
125 - 'other'=>str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s")),  
126 ]; 125 ];
  126 + $other = str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s"));
127 if($info === false){ 127 if($info === false){
128 $data['template_id'] = $bSettingInfo['template_id']; 128 $data['template_id'] = $bSettingInfo['template_id'];
129 $data['project_id'] = $this->user['project_id']; 129 $data['project_id'] = $this->user['project_id'];
@@ -132,6 +132,8 @@ class CustomTemplateLogic extends BaseLogic @@ -132,6 +132,8 @@ class CustomTemplateLogic extends BaseLogic
132 }else{ 132 }else{
133 $templateCommonModel->edit($data,['id'=>$info['id']]); 133 $templateCommonModel->edit($data,['id'=>$info['id']]);
134 } 134 }
  135 + //更新所有界面的other
  136 + $templateCommonModel->edit(['other'=>$other],['project_id'=>$this->user['project_id']]);
135 return $this->success(); 137 return $this->success();
136 } 138 }
137 139