|
@@ -63,6 +63,9 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -63,6 +63,9 @@ class BTemplateLogLogic extends BaseLogic |
|
63
|
//更新所有界面的other
|
63
|
//更新所有界面的other
|
|
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{
|
|
|
|
67
|
+ $other = str_replace('<header','',characterTruncation($info['text'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));
|
|
|
|
68
|
+ $commonTemplateModel->edit(['other'=>$other],['project_id'=>$this->user['project_id'],'template_id'=>$info['template_id']]);
|
|
66
|
}
|
69
|
}
|
|
67
|
}catch (\Exception $e){
|
70
|
}catch (\Exception $e){
|
|
68
|
$this->fail('系统错误,请联系管理员');
|
71
|
$this->fail('系统错误,请联系管理员');
|
|
@@ -115,7 +118,7 @@ class BTemplateLogLogic extends BaseLogic |
|
@@ -115,7 +118,7 @@ class BTemplateLogLogic extends BaseLogic |
|
115
|
$this->fail('当前数据不存在,或已被删除');
|
118
|
$this->fail('当前数据不存在,或已被删除');
|
|
116
|
}
|
119
|
}
|
|
117
|
if(empty($info['other'])){
|
120
|
if(empty($info['other'])){
|
|
118
|
- $info['other'] = str_replace('<header','',characterTruncation($info['text'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));;
|
121
|
+ $info['other'] = str_replace('<header','',characterTruncation($info['text'],"/<link id=\"google-fonts-link\"(.*?)<header/s"));
|
|
119
|
}
|
122
|
}
|
|
120
|
$html = $info['head_css'].$info['main_css'].$info['footer_css'].$info['other'].
|
123
|
$html = $info['head_css'].$info['main_css'].$info['footer_css'].$info['other'].
|
|
121
|
$info['head_html'].$info['main_html'].$info['footer_html'];
|
124
|
$info['head_html'].$info['main_html'].$info['footer_html'];
|