|
...
|
...
|
@@ -97,6 +97,7 @@ class InitHtmlLogic extends BaseLogic |
|
|
|
$mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom,'is_list'=>$is_list]);
|
|
|
|
if($mainInfo === false){
|
|
|
|
$data = [
|
|
|
|
'html'=>$this->param['html'],
|
|
|
|
'main_html'=>characterTruncationStr($this->param['html'],"<main","</main>"),
|
|
|
|
'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'),
|
|
|
|
'section_list_id'=>$this->param['section_list_id'] ?? '',
|
|
...
|
...
|
@@ -108,6 +109,7 @@ class InitHtmlLogic extends BaseLogic |
|
|
|
$bTemplateMainModel->add($data);
|
|
|
|
}else{
|
|
|
|
$data = [
|
|
|
|
'html'=>$this->param['html'],
|
|
|
|
'main_html'=>characterTruncationStr($this->param['html'],"<main","</main>"),
|
|
|
|
'main_css'=>characterTruncation($this->param['html'],'/<style id="globalsojs-styles">(.*?)<\/style>/s'),
|
|
|
|
'section_list_id'=>$this->param['section_list_id'] ?? '',
|
...
|
...
|
|