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