作者 lyh

gx

... ... @@ -621,7 +621,10 @@ class BTemplateLogic extends BaseLogic
* @method :post
* @time :2023/7/27 15:08
*/
public function getModule($type){
public function getModule($type,$is_custom){
if($is_custom == BTemplate::SOURCE_CUSTOM){
$type == BTemplate::TYPE_CUSTOM_DETAIL;
}
$mainModel = new TemplateTypeMain();
$info = $mainModel->read(['type'=>$type]);
return $info['main_html'];
... ... @@ -842,9 +845,9 @@ class BTemplateLogic extends BaseLogic
$commonInfo = $this->getTypeCommonHtml($bSettingInfo['template_id'],$this->param['type'],$is_custom);
//获取设置的默认中间部分
$bTemplateMainModel = new BTemplateMain();
$mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
$mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom]);
if($mainInfo === false){
$main_html = $this->getModule($this->param['type']);
$main_html = $this->getModule($this->param['type'],$is_custom);
$main_style = "<style id='globalsojs-styles'></style>";
}else{
$main_html = $mainInfo['main_html'];
... ...