作者 lyh

gx

@@ -122,9 +122,8 @@ class CustomTemplateLogic extends BaseLogic @@ -122,9 +122,8 @@ class CustomTemplateLogic extends BaseLogic
122 'project_id'=>$this->user['project_id'], 122 'project_id'=>$this->user['project_id'],
123 'source'=>1//首页 123 'source'=>1//首页
124 ]); 124 ]);
125 - if($TemplateInfo === false){  
126 - $this->fail('请先装修首页');  
127 - } 125 + $html = '';
  126 + if($TemplateInfo !== false){
128 if(empty($preg_html)){ 127 if(empty($preg_html)){
129 $preg_html = "<main></main>"; 128 $preg_html = "<main></main>";
130 $html = preg_replace('/<style id="globalsojs-styles">(.*?)<\/style>/s', "<style id='globalsojs-styles'></style>", $TemplateInfo['html']); 129 $html = preg_replace('/<style id="globalsojs-styles">(.*?)<\/style>/s', "<style id='globalsojs-styles'></style>", $TemplateInfo['html']);
@@ -133,6 +132,7 @@ class CustomTemplateLogic extends BaseLogic @@ -133,6 +132,7 @@ class CustomTemplateLogic extends BaseLogic
133 } 132 }
134 //内容 133 //内容
135 $html = preg_replace('/<main\b[^>]*>(.*?)<\/main>/s', $preg_html, $html); 134 $html = preg_replace('/<main\b[^>]*>(.*?)<\/main>/s', $preg_html, $html);
  135 + }
136 return $html; 136 return $html;
137 } 137 }
138 138