|
...
|
...
|
@@ -442,6 +442,24 @@ class BTemplateLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function handleVisualizationParam($html,$source, $is_list,$is_custom,$data){
|
|
|
|
if($this->user['is_customized'] == BTemplate::IS_VISUALIZATION){//定制项目
|
|
|
|
//TODO::扩展模块定制单独处理
|
|
|
|
if($is_custom == BTemplate::IS_CUSTOM){
|
|
|
|
$customModuleModel = new CustomModule();
|
|
|
|
$info = $customModuleModel->read(['id'=>$source]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前扩展模块不存在或已被删除');
|
|
|
|
}
|
|
|
|
//todo::扩展模块(列表页/详情页)定制
|
|
|
|
if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
|
|
|
|
$data['html'] = $html;
|
|
|
|
$data['type'] = BTemplate::ALL_HTML;
|
|
|
|
}else{
|
|
|
|
$mainInfo = $this->handleTemplateHtml($html);
|
|
|
|
$data['main_html'] = $mainInfo['main_html'];
|
|
|
|
$data['main_css'] = $mainInfo['main_css'];
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
|
|
|
//查看当前页面是否定制,是否开启可视化
|
|
|
|
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
...
|
...
|
@@ -449,19 +467,6 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$data['html'] = $html;
|
|
|
|
$data['type'] = BTemplate::ALL_HTML;
|
|
|
|
}else{
|
|
|
|
//TODO::扩展模块定制单独处理
|
|
|
|
if($is_custom == BTemplate::IS_CUSTOM){
|
|
|
|
$customModuleModel = new CustomModule();
|
|
|
|
$info = $customModuleModel->read(['id'=>$source]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前扩展模块不存在或已被删除');
|
|
|
|
}
|
|
|
|
//todo::扩展模块(列表页/详情页)定制
|
|
|
|
if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
|
|
|
|
$data['html'] = $html;
|
|
|
|
$data['type'] = BTemplate::ALL_HTML;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$mainInfo = $this->handleTemplateHtml($html);
|
|
|
|
$data['main_html'] = $mainInfo['main_html'];
|
|
|
|
$data['main_css'] = $mainInfo['main_css'];
|
...
|
...
|
|