作者 lyh

gx

... ... @@ -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);
}
/**
... ...
... ... @@ -142,6 +142,9 @@ class KeywordLogic extends BaseLogic
}
try {
foreach ($this->param['title'] as $k=>$v){
if(empty($v)){
continue;
}
$this->model = new Keyword();
$info = $this->model->read(['title'=>$v]);
if($info === false){
... ...