作者 lyh

gx

... ... @@ -235,7 +235,7 @@ class BTemplateLogic extends BaseLogic
$bTemplateMainModel = new BTemplateMain();
$mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$type]);
if($mainInfo === false){
$data['main_html'] = $this->getModule($type,$is_custom);
$data['main_html'] = $this->getModule($type);
$data['main_css'] = "<style id='globalsojs-styles'></style>";
}else{
$data['main_html'] = $mainInfo['main_html'];
... ... @@ -621,7 +621,7 @@ class BTemplateLogic extends BaseLogic
* @method :post
* @time :2023/7/27 15:08
*/
public function getModule($type,$is_custom){
public function getModule($type){
$mainModel = new TemplateTypeMain();
$info = $mainModel->read(['type'=>$type]);
return $info['main_html'];
... ... @@ -844,7 +844,10 @@ class BTemplateLogic extends BaseLogic
$bTemplateMainModel = new BTemplateMain();
$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'],$is_custom);
if($is_custom == BTemplate::SOURCE_CUSTOM) {
$this->param['type'] = BTemplate::TYPE_CUSTOM_DETAIL;
}
$main_html = $this->getModule($this->param['type']);
$main_style = "<style id='globalsojs-styles'></style>";
}else{
$main_html = $mainInfo['main_html'];
... ...