|
...
|
...
|
@@ -285,25 +285,9 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
//获取type类型
|
|
|
|
$commonInfo = $this->getCommonPage($info['template_id']);
|
|
|
|
$html = '';
|
|
|
|
if($commonInfo !== false){
|
|
|
|
$html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
|
|
|
|
$commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
|
|
|
|
}else{
|
|
|
|
//兼容老数据,获取首页数据
|
|
|
|
$TemplateInfo = (new BTemplate())->read([
|
|
|
|
'template_id'=>$info['template_id'],
|
|
|
|
'source'=>1,
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
|
|
'source_id'=>0,
|
|
|
|
]);;
|
|
|
|
if($TemplateInfo !== false){
|
|
|
|
$html = preg_replace('/<style id="globalsojs-styles">(.*?)<\/style>/s',$html_style , $TemplateInfo['html']);
|
|
|
|
//内容
|
|
|
|
$html = preg_replace('/<main\b[^>]*>(.*?)<\/main>/s', $preg_html, $html);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $html;
|
|
|
|
$html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
|
|
|
|
$commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
|
|
|
|
return $this->success($html);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|