|
...
|
...
|
@@ -97,7 +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 = [
|
|
|
|
'main_html'=>characterTruncation($this->param['html'],'/<main\b[^>]*>(.*?)<\/main>/s'),
|
|
|
|
'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'] ?? '',
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
...
|
...
|
@@ -108,7 +108,7 @@ class InitHtmlLogic extends BaseLogic |
|
|
|
$bTemplateMainModel->add($data);
|
|
|
|
}else{
|
|
|
|
$data = [
|
|
|
|
'main_html'=>characterTruncation($this->param['html'],'/<main\b[^>]*>(.*?)<\/main>/s'),
|
|
|
|
'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'] ?? '',
|
|
|
|
];
|
...
|
...
|
|