作者 lyh

gx

@@ -123,6 +123,19 @@ class BTemplateLogLogic extends BaseLogic @@ -123,6 +123,19 @@ class BTemplateLogLogic extends BaseLogic
123 $this->fail('当前数据不存在,或已被删除'); 123 $this->fail('当前数据不存在,或已被删除');
124 } 124 }
125 if($this->user['is_customized'] != BTemplate::IS_VISUALIZATION){ 125 if($this->user['is_customized'] != BTemplate::IS_VISUALIZATION){
  126 + $html = $this->getTemplateHtml($info);
  127 + }else{
  128 + $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
  129 + if (in_array(1, $page_array)) {//首页是定制界面
  130 + $html = $info['text'];
  131 + }else{
  132 + $html = $this->getTemplateHtml($info);
  133 + }
  134 + }
  135 + return $this->success(['html'=>$html]);
  136 + }
  137 +
  138 + public function getTemplateHtml($info){
126 if(empty($info['other'])){ 139 if(empty($info['other'])){
127 $footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s')); 140 $footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
128 $info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other); 141 $info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
@@ -140,13 +153,6 @@ class BTemplateLogLogic extends BaseLogic @@ -140,13 +153,6 @@ class BTemplateLogLogic extends BaseLogic
140 $html = $html.$v['values']; 153 $html = $html.$v['values'];
141 } 154 }
142 } 155 }
143 - }else{  
144 - $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面  
145 - if (in_array(1, $page_array)) {//首页是定制界面  
146 - $html = $info['text']; 156 + return $this->success($html);
147 } 157 }
148 - }  
149 - return $this->success(['html'=>$html]);  
150 - }  
151 -  
152 } 158 }