|
@@ -64,7 +64,8 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -64,7 +64,8 @@ class BTemplateLogLogic extends BaseLogic |
|
64
|
if(!empty($info['other'])){
|
64
|
if(!empty($info['other'])){
|
|
65
|
$commonTemplateModel->edit(['other'=>$info['other']],['project_id'=>$this->user['project_id'],'template_id'=>$info['template_id']]);
|
65
|
$commonTemplateModel->edit(['other'=>$info['other']],['project_id'=>$this->user['project_id'],'template_id'=>$info['template_id']]);
|
|
66
|
}else{
|
66
|
}else{
|
|
67
|
- $other = str_replace('<header','',characterTruncation($info['text'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));
|
67
|
+ $footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
|
|
|
|
68
|
+ $other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
|
68
|
$commonTemplateModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$info['template_id']]);
|
69
|
$commonTemplateModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$info['template_id']]);
|
|
69
|
}
|
70
|
}
|
|
70
|
}catch (\Exception $e){
|
71
|
}catch (\Exception $e){
|
|
@@ -118,7 +119,8 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -118,7 +119,8 @@ class BTemplateLogLogic extends BaseLogic |
|
118
|
$this->fail('当前数据不存在,或已被删除');
|
119
|
$this->fail('当前数据不存在,或已被删除');
|
|
119
|
}
|
120
|
}
|
|
120
|
if(empty($info['other'])){
|
121
|
if(empty($info['other'])){
|
|
121
|
- $info['other'] = str_replace('<header','',characterTruncation($info['text'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));
|
122
|
+ $footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
|
|
|
|
123
|
+ $info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
|
122
|
}
|
124
|
}
|
|
123
|
$html = $info['head_css'].$info['main_css'].$info['footer_css'].$info['other'].
|
125
|
$html = $info['head_css'].$info['main_css'].$info['footer_css'].$info['other'].
|
|
124
|
$info['head_html'].$info['main_html'].$info['footer_html'];
|
126
|
$info['head_html'].$info['main_html'].$info['footer_html'];
|