|
...
|
...
|
@@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
//获取当前数据详情
|
|
|
|
$info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']);
|
|
|
|
if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){
|
|
|
|
//还原头部底部
|
|
|
|
$type = $this->getType();
|
|
|
|
//还原头部+底部
|
|
|
|
$commonData = [
|
|
|
|
'head_html'=>$logInfo['head_html'], 'head_css'=>$logInfo['head_css'],
|
|
|
|
'footer_html'=>$logInfo['footer_html'], 'footer_css'=>$logInfo['footer_css']
|
|
|
|
];
|
|
|
|
$commonTemplateModel = new BTemplateCommon();
|
|
|
|
$commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]);
|
|
|
|
$comTemplateModel = new BTemplateCom();
|
|
|
|
//还原头部底部
|
|
|
|
$header_type = $this->getType(BTemplate::COMMON_HEAD);
|
|
|
|
$comTemplateModel->edit(['html'=>$logInfo['other']],['template_id'=>$logInfo['template_id'],'type'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_OTHER]);
|
|
|
|
$comTemplateModel->edit(['html'=>$logInfo['head_html'], 'html_style'=>$logInfo['head_css']],['template_id'=>$logInfo['template_id'],'type'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_HEAD]);
|
|
|
|
$footer_type = $this->getType(BTemplate::COMMON_FOOTER);
|
|
|
|
$comTemplateModel->edit(['html'=>$logInfo['footer_html'], 'html_style'=>$logInfo['footer_css']],['template_id'=>$logInfo['template_id'],'type'=>$footer_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_FOOTER]);
|
|
|
|
$this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]);
|
|
|
|
}else{
|
|
|
|
$this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]);
|
...
|
...
|
|