|
...
|
...
|
@@ -309,7 +309,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$param['is_custom'] = 0;
|
|
|
|
}
|
|
|
|
$info = $this->webTemplateInfo($this->param['template_id'],$param['source'],$param['source_id'],$param['is_custom']);
|
|
|
|
if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部
|
|
|
|
if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部,不需要保存头部底部
|
|
|
|
$this->saveCommonTemplate($param);
|
|
|
|
}
|
|
|
|
$param['project_id'] = $this->user['project_id'];
|
|
...
|
...
|
@@ -368,10 +368,13 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$pageSettingModel = new PageSetting();
|
|
|
|
$pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id']]);
|
|
|
|
if ($pageInfo !== false) {
|
|
|
|
if ($source == 2) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = 2;}} else {if ($pageInfo['product_list'] != 0) {$type = 3;}}}
|
|
|
|
if ($source == 3) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = 4;}} else {if ($pageInfo['blog_list'] != 0) {$type = 5;}}}
|
|
|
|
if ($source == 4) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = 6;}} else {if ($pageInfo['news_list'] != 0) {$type = 7;}}}
|
|
|
|
if ($source == 5) {if ($pageInfo['polymerization'] != 0) {$type = 8;}}
|
|
|
|
if ($source == BTemplate::SOURCE_PRODUCT) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_TWO;}}
|
|
|
|
else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_THREE;}}}
|
|
|
|
if ($source == BTemplate::SOURCE_BLOG) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_FOUR;}}
|
|
|
|
else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_FIVE;}}}
|
|
|
|
if ($source == BTemplate::SOURCE_NEWS) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_SIX;}}
|
|
|
|
else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_SEVEN;}}}
|
|
|
|
if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_EIGHT;}}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $type;
|
|
...
|
...
|
@@ -494,7 +497,6 @@ class BTemplateLogic extends BaseLogic |
|
|
|
* @time :2023/7/27 15:08
|
|
|
|
*/
|
|
|
|
public function getModule($type){
|
|
|
|
//获取公共主题头部底部
|
|
|
|
$mainModel = new TemplateTypeMain();
|
|
|
|
$info = $mainModel->read(['type'=>$type]);
|
|
|
|
return $info['main_html'];
|
...
|
...
|
|