作者 lyh

gx

... ... @@ -36,6 +36,7 @@ class PageSettingController extends BaseController
'news_list'=>0,
'news_details'=>0,
'polymerization'=>0,
'home'=>0,
'type'=>$this->param['type'] ?? 1,
];
$pageSettingModel->add($info);
... ...
... ... @@ -82,7 +82,7 @@ class BTemplateLogic extends BaseLogic
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
return $this->getCustomizeAllHtml($templateInfo,$template_id,$is_custom,$is_list);
}
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_style'=>$templateInfo['main_css']];
}
$commonInfo = $this->getTemplateComHtml($this->param['source'],$is_list,$is_custom,$template_id);//获取非定制头部
$html = $commonInfo['head_style'].$mainInfo['main_style'].$commonInfo['footer_style'].$commonInfo['other']. $commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
... ... @@ -129,11 +129,11 @@ class BTemplateLogic extends BaseLogic
$commonHead = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_HEAD);
$bTemplateComModel = new BTemplateCom();
$condition['source'] = $commonHead;
$condition['common_type'] = BTemplate::COMMON_FOOTER;
$condition['common_type'] = BTemplate::COMMON_HEAD;
$headComInfo = $bTemplateComModel->read($condition);
if($headComInfo === false){
//取默认首页的
$condition['source'] = BTemplate::SOURCE_HOME;
//取默认公共的
$condition['source'] = BTemplate::SOURCE_COM;
$headComInfo = $bTemplateComModel->read($condition);
if($headComInfo === false){
$this->fail('获取失败,请联系管理员');
... ... @@ -155,7 +155,7 @@ class BTemplateLogic extends BaseLogic
$footerComInfo = $bTemplateComModel->read($condition);
if($footerComInfo === false){
//取默认首页的
$condition['source'] = BTemplate::SOURCE_HOME;
$condition['source'] = BTemplate::SOURCE_COM;
$footerComInfo = $bTemplateComModel->read($condition);
if($footerComInfo === false){
$this->fail('获取失败,请联系管理员');
... ... @@ -572,7 +572,7 @@ class BTemplateLogic extends BaseLogic
* @time :2023/10/21 17:29
*/
public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$CommonType = BTemplate::COMMON_HEAD){
$type = BTemplate::SOURCE_HOME;//首页公共头部底部
$type = BTemplate::SOURCE_COM;//首页公共头部底部
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
if($is_custom == BTemplate::IS_CUSTOM || $is_head == BTemplate::IS_NO_HEADER){//拓展模块为首页头部
return $this->success($type);
... ... @@ -583,6 +583,7 @@ class BTemplateLogic extends BaseLogic
if ($pageInfo === false) {
return $this->success($type);
}
if($source == BTemplate::SOURCE_HOME){if ($pageInfo['home'] != 0){$type = BTemplate::SOURCE_HOME;}}
if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}
else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}}
if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::SOURCE_BLOG;}}
... ...