作者 lyh

gx

@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\BTemplate; @@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\BTemplate;
11 11
12 use App\Http\Logic\Bside\BaseLogic; 12 use App\Http\Logic\Bside\BaseLogic;
13 use App\Models\Project\PageSetting; 13 use App\Models\Project\PageSetting;
  14 +use App\Models\Service\Service as ServiceSettingModel;
14 use App\Models\Template\BTemplate; 15 use App\Models\Template\BTemplate;
15 use App\Models\Template\BTemplateCommon; 16 use App\Models\Template\BTemplateCommon;
16 use App\Models\Template\BTemplateMain; 17 use App\Models\Template\BTemplateMain;
@@ -86,6 +87,7 @@ class VisualizationLogic extends BaseLogic @@ -86,6 +87,7 @@ class VisualizationLogic extends BaseLogic
86 //拼接数据 87 //拼接数据
87 $html = $commonInfo['head_css'].$mainData['main_css'].$commonInfo['footer_css'].$commonInfo['other']. 88 $html = $commonInfo['head_css'].$mainData['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
88 $commonInfo['head_html'].$mainData['main_html'].$commonInfo['footer_html']; 89 $commonInfo['head_html'].$mainData['main_html'].$commonInfo['footer_html'];
  90 + $html = $this->getHeadFooter($html);
89 return $html; 91 return $html;
90 } 92 }
91 }else{ 93 }else{
@@ -99,6 +101,7 @@ class VisualizationLogic extends BaseLogic @@ -99,6 +101,7 @@ class VisualizationLogic extends BaseLogic
99 $commonInfo = $this->getCommonPage($this->param['source'],$this->param['source_id'],$settingInfo['template_id']); 101 $commonInfo = $this->getCommonPage($this->param['source'],$this->param['source_id'],$settingInfo['template_id']);
100 $html = $commonInfo['head_css'].$TemplateInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other']. 102 $html = $commonInfo['head_css'].$TemplateInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
101 $commonInfo['head_html'].$TemplateInfo['main_html'].$commonInfo['footer_html']; 103 $commonInfo['head_html'].$TemplateInfo['main_html'].$commonInfo['footer_html'];
  104 + $html = $this->getHeadFooter($html);
102 return $html; 105 return $html;
103 }else{ 106 }else{
104 return $TemplateInfo['html']; 107 return $TemplateInfo['html'];
@@ -107,6 +110,29 @@ class VisualizationLogic extends BaseLogic @@ -107,6 +110,29 @@ class VisualizationLogic extends BaseLogic
107 } 110 }
108 111
109 /** 112 /**
  113 + * @remark :拼接获取公共头部底部
  114 + * @name :getHeadFooter
  115 + * @author :lyh
  116 + * @method :post
  117 + * @time :2023/7/21 17:22
  118 + */
  119 + public function getHeadFooter($html){
  120 + //获取公共主题头部底部
  121 + $serviceSettingModel = new ServiceSettingModel();
  122 + $list = $serviceSettingModel->list(['type'=>2],'created_at');
  123 + //拼接html
  124 + foreach ($list as $v){
  125 + if($v['key'] == 'head'){
  126 + $html = $v['values'].$html;
  127 + }
  128 + if($v['key'] == 'footer'){
  129 + $html = $html.$v['values'];
  130 + }
  131 + }
  132 + return $html;
  133 + }
  134 +
  135 + /**
110 * @remark :获取可视化装修记录 136 * @remark :获取可视化装修记录
111 * @name :getWebTemplate 137 * @name :getWebTemplate
112 * @author :lyh 138 * @author :lyh