作者 lyh

gx聚合页关键字前后缀

@@ -30,6 +30,9 @@ class AggregateKeywordAffixLogic extends BaseLogic @@ -30,6 +30,9 @@ class AggregateKeywordAffixLogic extends BaseLogic
30 */ 30 */
31 public function getAffix(){ 31 public function getAffix(){
32 $data = $this->model->read(['project_id'=>$this->param['project_id']]); 32 $data = $this->model->read(['project_id'=>$this->param['project_id']]);
  33 + if($data === false){
  34 + $data = [];
  35 + }
33 return $this->success($data); 36 return $this->success($data);
34 } 37 }
35 38
@@ -49,10 +49,16 @@ class CustomTemplateLogic extends BaseLogic @@ -49,10 +49,16 @@ class CustomTemplateLogic extends BaseLogic
49 if($info === false){ 49 if($info === false){
50 $this->fail('当前数据不存在'); 50 $this->fail('当前数据不存在');
51 } 51 }
  52 + if(!empty($info['html'])){
  53 + $info['is_renovation'] = 1;
  54 + }else{
  55 + $info['html'] = $info['text'];
  56 + $info['is_renovation'] = 0;
  57 + }
52 $info['image'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']); 58 $info['image'] = getImageUrl($info['image'],$this->user['storage_type'],$this->user['project_location']);
53 if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){ 59 if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){
54 $template_id = $this->getTemplateId(); 60 $template_id = $this->getTemplateId();
55 - $html = $this->getTemplateComHtml(empty($info['html']) ? $info['text'] : $info['html'],$info['html_style'],$template_id); 61 + $html = $this->getTemplateComHtml($info['html'],$info['html_style'],$template_id);
56 $info['html'] = $this->getHeadFooter($html); 62 $info['html'] = $this->getHeadFooter($html);
57 } 63 }
58 return $this->success($info); 64 return $this->success($info);