正在显示
1 个修改的文件
包含
7 行增加
和
8 行删除
| @@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic | @@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic | ||
| 478 | //获取当前数据详情 | 478 | //获取当前数据详情 |
| 479 | $info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']); | 479 | $info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']); |
| 480 | if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){ | 480 | if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){ |
| 481 | - //还原头部底部 | ||
| 482 | - $type = $this->getType(); | ||
| 483 | //还原头部+底部 | 481 | //还原头部+底部 |
| 484 | - $commonData = [ | ||
| 485 | - 'head_html'=>$logInfo['head_html'], 'head_css'=>$logInfo['head_css'], | ||
| 486 | - 'footer_html'=>$logInfo['footer_html'], 'footer_css'=>$logInfo['footer_css'] | ||
| 487 | - ]; | ||
| 488 | - $commonTemplateModel = new BTemplateCommon(); | ||
| 489 | - $commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]); | 482 | + $comTemplateModel = new BTemplateCom(); |
| 483 | + //还原头部底部 | ||
| 484 | + $header_type = $this->getType(BTemplate::COMMON_HEAD); | ||
| 485 | + $comTemplateModel->edit(['html'=>$logInfo['other']],['template_id'=>$logInfo['template_id'],'type'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_OTHER]); | ||
| 486 | + $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]); | ||
| 487 | + $footer_type = $this->getType(BTemplate::COMMON_FOOTER); | ||
| 488 | + $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]); | ||
| 490 | $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); | 489 | $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); |
| 491 | }else{ | 490 | }else{ |
| 492 | $this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]); | 491 | $this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]); |
-
请 注册 或 登录 后发表评论