正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -621,7 +621,10 @@ class BTemplateLogic extends BaseLogic | @@ -621,7 +621,10 @@ class BTemplateLogic extends BaseLogic | ||
| 621 | * @method :post | 621 | * @method :post |
| 622 | * @time :2023/7/27 15:08 | 622 | * @time :2023/7/27 15:08 |
| 623 | */ | 623 | */ |
| 624 | - public function getModule($type){ | 624 | + public function getModule($type,$is_custom){ |
| 625 | + if($is_custom == BTemplate::SOURCE_CUSTOM){ | ||
| 626 | + $type == BTemplate::TYPE_CUSTOM_DETAIL; | ||
| 627 | + } | ||
| 625 | $mainModel = new TemplateTypeMain(); | 628 | $mainModel = new TemplateTypeMain(); |
| 626 | $info = $mainModel->read(['type'=>$type]); | 629 | $info = $mainModel->read(['type'=>$type]); |
| 627 | return $info['main_html']; | 630 | return $info['main_html']; |
| @@ -842,9 +845,9 @@ class BTemplateLogic extends BaseLogic | @@ -842,9 +845,9 @@ class BTemplateLogic extends BaseLogic | ||
| 842 | $commonInfo = $this->getTypeCommonHtml($bSettingInfo['template_id'],$this->param['type'],$is_custom); | 845 | $commonInfo = $this->getTypeCommonHtml($bSettingInfo['template_id'],$this->param['type'],$is_custom); |
| 843 | //获取设置的默认中间部分 | 846 | //获取设置的默认中间部分 |
| 844 | $bTemplateMainModel = new BTemplateMain(); | 847 | $bTemplateMainModel = new BTemplateMain(); |
| 845 | - $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']]); | 848 | + $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom]); |
| 846 | if($mainInfo === false){ | 849 | if($mainInfo === false){ |
| 847 | - $main_html = $this->getModule($this->param['type']); | 850 | + $main_html = $this->getModule($this->param['type'],$is_custom); |
| 848 | $main_style = "<style id='globalsojs-styles'></style>"; | 851 | $main_style = "<style id='globalsojs-styles'></style>"; |
| 849 | }else{ | 852 | }else{ |
| 850 | $main_html = $mainInfo['main_html']; | 853 | $main_html = $mainInfo['main_html']; |
-
请 注册 或 登录 后发表评论