作者 lyh

gx

@@ -36,6 +36,7 @@ class PageSettingController extends BaseController @@ -36,6 +36,7 @@ class PageSettingController extends BaseController
36 'news_list'=>0, 36 'news_list'=>0,
37 'news_details'=>0, 37 'news_details'=>0,
38 'polymerization'=>0, 38 'polymerization'=>0,
  39 + 'home'=>0,
39 'type'=>$this->param['type'] ?? 1, 40 'type'=>$this->param['type'] ?? 1,
40 ]; 41 ];
41 $pageSettingModel->add($info); 42 $pageSettingModel->add($info);
@@ -82,7 +82,7 @@ class BTemplateLogic extends BaseLogic @@ -82,7 +82,7 @@ class BTemplateLogic extends BaseLogic
82 if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码 82 if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
83 return $this->getCustomizeAllHtml($templateInfo,$template_id,$is_custom,$is_list); 83 return $this->getCustomizeAllHtml($templateInfo,$template_id,$is_custom,$is_list);
84 } 84 }
85 - $mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']]; 85 + $mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_style'=>$templateInfo['main_css']];
86 } 86 }
87 $commonInfo = $this->getTemplateComHtml($this->param['source'],$is_list,$is_custom,$template_id);//获取非定制头部 87 $commonInfo = $this->getTemplateComHtml($this->param['source'],$is_list,$is_custom,$template_id);//获取非定制头部
88 $html = $commonInfo['head_style'].$mainInfo['main_style'].$commonInfo['footer_style'].$commonInfo['other']. $commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html']; 88 $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 @@ -129,11 +129,11 @@ class BTemplateLogic extends BaseLogic
129 $commonHead = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_HEAD); 129 $commonHead = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_HEAD);
130 $bTemplateComModel = new BTemplateCom(); 130 $bTemplateComModel = new BTemplateCom();
131 $condition['source'] = $commonHead; 131 $condition['source'] = $commonHead;
132 - $condition['common_type'] = BTemplate::COMMON_FOOTER; 132 + $condition['common_type'] = BTemplate::COMMON_HEAD;
133 $headComInfo = $bTemplateComModel->read($condition); 133 $headComInfo = $bTemplateComModel->read($condition);
134 if($headComInfo === false){ 134 if($headComInfo === false){
135 - //取默认首页的  
136 - $condition['source'] = BTemplate::SOURCE_HOME; 135 + //取默认公共的
  136 + $condition['source'] = BTemplate::SOURCE_COM;
137 $headComInfo = $bTemplateComModel->read($condition); 137 $headComInfo = $bTemplateComModel->read($condition);
138 if($headComInfo === false){ 138 if($headComInfo === false){
139 $this->fail('获取失败,请联系管理员'); 139 $this->fail('获取失败,请联系管理员');
@@ -155,7 +155,7 @@ class BTemplateLogic extends BaseLogic @@ -155,7 +155,7 @@ class BTemplateLogic extends BaseLogic
155 $footerComInfo = $bTemplateComModel->read($condition); 155 $footerComInfo = $bTemplateComModel->read($condition);
156 if($footerComInfo === false){ 156 if($footerComInfo === false){
157 //取默认首页的 157 //取默认首页的
158 - $condition['source'] = BTemplate::SOURCE_HOME; 158 + $condition['source'] = BTemplate::SOURCE_COM;
159 $footerComInfo = $bTemplateComModel->read($condition); 159 $footerComInfo = $bTemplateComModel->read($condition);
160 if($footerComInfo === false){ 160 if($footerComInfo === false){
161 $this->fail('获取失败,请联系管理员'); 161 $this->fail('获取失败,请联系管理员');
@@ -572,7 +572,7 @@ class BTemplateLogic extends BaseLogic @@ -572,7 +572,7 @@ class BTemplateLogic extends BaseLogic
572 * @time :2023/10/21 17:29 572 * @time :2023/10/21 17:29
573 */ 573 */
574 public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$CommonType = BTemplate::COMMON_HEAD){ 574 public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$CommonType = BTemplate::COMMON_HEAD){
575 - $type = BTemplate::SOURCE_HOME;//首页公共头部底部 575 + $type = BTemplate::SOURCE_COM;//首页公共头部底部
576 $is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER; 576 $is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
577 if($is_custom == BTemplate::IS_CUSTOM || $is_head == BTemplate::IS_NO_HEADER){//拓展模块为首页头部 577 if($is_custom == BTemplate::IS_CUSTOM || $is_head == BTemplate::IS_NO_HEADER){//拓展模块为首页头部
578 return $this->success($type); 578 return $this->success($type);
@@ -583,6 +583,7 @@ class BTemplateLogic extends BaseLogic @@ -583,6 +583,7 @@ class BTemplateLogic extends BaseLogic
583 if ($pageInfo === false) { 583 if ($pageInfo === false) {
584 return $this->success($type); 584 return $this->success($type);
585 } 585 }
  586 + if($source == BTemplate::SOURCE_HOME){if ($pageInfo['home'] != 0){$type = BTemplate::SOURCE_HOME;}}
586 if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}} 587 if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}
587 else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}} 588 else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}}
588 if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::SOURCE_BLOG;}} 589 if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::SOURCE_BLOG;}}