作者 lyh

gx

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