|
...
|
...
|
@@ -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,10 +621,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/27 15:08
|
|
|
|
*/
|
|
|
|
public function getModule($type,$is_custom){
|
|
|
|
if($is_custom == BTemplate::SOURCE_CUSTOM){
|
|
|
|
$type == BTemplate::TYPE_CUSTOM_DETAIL;
|
|
|
|
}
|
|
|
|
public function getModule($type){
|
|
|
|
$mainModel = new TemplateTypeMain();
|
|
|
|
$info = $mainModel->read(['type'=>$type]);
|
|
|
|
return $info['main_html'];
|
|
...
|
...
|
@@ -667,14 +664,6 @@ class BTemplateLogic extends BaseLogic |
|
|
|
return $this->success($list);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取类型
|
|
|
|
* @name :getModuleType
|
|
|
|
* @author :lyh
|
|
|
|
* @method :any
|
|
|
|
* @time :2023/7/17 16:03
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @remark :获取类型
|
|
|
|
* @name :getModuleType
|
|
...
|
...
|
@@ -701,6 +690,13 @@ class BTemplateLogic extends BaseLogic |
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取类型
|
|
|
|
* @name :getModuleTypes
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/26 14:18
|
|
|
|
*/
|
|
|
|
public function getModuleTypes(){
|
|
|
|
$data['module'] = ['默认','产品','新闻','博客','产品分类'];
|
|
|
|
$data = [
|
|
...
|
...
|
@@ -847,7 +843,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'];
|
...
|
...
|
|