|
@@ -285,25 +285,9 @@ class CustomTemplateLogic extends BaseLogic |
|
@@ -285,25 +285,9 @@ class CustomTemplateLogic extends BaseLogic |
|
285
|
}
|
285
|
}
|
|
286
|
//获取type类型
|
286
|
//获取type类型
|
|
287
|
$commonInfo = $this->getCommonPage($info['template_id']);
|
287
|
$commonInfo = $this->getCommonPage($info['template_id']);
|
|
288
|
- $html = '';
|
|
|
|
289
|
- if($commonInfo !== false){
|
|
|
|
290
|
- $html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
|
|
|
|
291
|
- $commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
|
|
|
|
292
|
- }else{
|
|
|
|
293
|
- //兼容老数据,获取首页数据
|
|
|
|
294
|
- $TemplateInfo = (new BTemplate())->read([
|
|
|
|
295
|
- 'template_id'=>$info['template_id'],
|
|
|
|
296
|
- 'source'=>1,
|
|
|
|
297
|
- 'project_id'=>$this->user['project_id'],
|
|
|
|
298
|
- 'source_id'=>0,
|
|
|
|
299
|
- ]);;
|
|
|
|
300
|
- if($TemplateInfo !== false){
|
|
|
|
301
|
- $html = preg_replace('/<style id="globalsojs-styles">(.*?)<\/style>/s',$html_style , $TemplateInfo['html']);
|
|
|
|
302
|
- //内容
|
|
|
|
303
|
- $html = preg_replace('/<main\b[^>]*>(.*?)<\/main>/s', $preg_html, $html);
|
|
|
|
304
|
- }
|
|
|
|
305
|
- }
|
|
|
|
306
|
- return $html;
|
288
|
+ $html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
|
|
|
|
289
|
+ $commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
|
|
|
|
290
|
+ return $this->success($html);
|
|
307
|
}
|
291
|
}
|
|
308
|
|
292
|
|
|
309
|
/**
|
293
|
/**
|