作者 lyh

gx

... ... @@ -123,6 +123,19 @@ class BTemplateLogLogic extends BaseLogic
$this->fail('当前数据不存在,或已被删除');
}
if($this->user['is_customized'] != BTemplate::IS_VISUALIZATION){
$html = $this->getTemplateHtml($info);
}else{
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
if (in_array(1, $page_array)) {//首页是定制界面
$html = $info['text'];
}else{
$html = $this->getTemplateHtml($info);
}
}
return $this->success(['html'=>$html]);
}
public function getTemplateHtml($info){
if(empty($info['other'])){
$footer_other = str_replace('<header','',characterTruncation($info['text'],'/<style id="globalsojs-footer">(.*?)<header/s'));
$info['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
... ... @@ -140,13 +153,6 @@ class BTemplateLogLogic extends BaseLogic
$html = $html.$v['values'];
}
}
}else{
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
if (in_array(1, $page_array)) {//首页是定制界面
$html = $info['text'];
return $this->success($html);
}
}
return $this->success(['html'=>$html]);
}
}
... ...