|
@@ -80,7 +80,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -80,7 +80,7 @@ class BTemplateLogic extends BaseLogic |
|
80
|
$mainInfo = $this->getMAinHtml($this->param['source'],$is_custom,$is_list);//获取中间部分代码
|
80
|
$mainInfo = $this->getMAinHtml($this->param['source'],$is_custom,$is_list);//获取中间部分代码
|
|
81
|
}else{
|
81
|
}else{
|
|
82
|
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
|
82
|
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
|
|
83
|
- $commonInfo = $this->getCommonHtml($this->param['source'],$is_list,0,0);//获取定制头部
|
83
|
+ $commonInfo = $this->getCommonHtml($this->param['source'],$is_list,0);//获取定制头部
|
|
84
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
84
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
|
85
|
return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id'],'updated_at'=>$templateInfo['updated_at']]);
|
85
|
return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id'],'updated_at'=>$templateInfo['updated_at']]);
|
|
86
|
}
|
86
|
}
|
|
@@ -172,7 +172,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -172,7 +172,7 @@ class BTemplateLogic extends BaseLogic |
|
172
|
if($customHtmlInfo === false){
|
172
|
if($customHtmlInfo === false){
|
|
173
|
$this->fail('定制页面,请先上传代码块');
|
173
|
$this->fail('定制页面,请先上传代码块');
|
|
174
|
}
|
174
|
}
|
|
175
|
- $commonInfo = $this->getCommonHtml($type,$is_list,0,0);//获取定制头部
|
175
|
+ $commonInfo = $this->getCommonHtml($type,$is_list,0);//获取定制头部
|
|
176
|
if($commonInfo !== false){
|
176
|
if($commonInfo !== false){
|
|
177
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
177
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
|
178
|
}
|
178
|
}
|
|
@@ -247,7 +247,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -247,7 +247,7 @@ class BTemplateLogic extends BaseLogic |
|
247
|
* @method :post
|
247
|
* @method :post
|
|
248
|
* @time :2023/10/21 16:55
|
248
|
* @time :2023/10/21 16:55
|
|
249
|
*/
|
249
|
*/
|
|
250
|
- public function getCommonHtml($source,$is_list,$template_id,$is_custom){
|
250
|
+ public function getCommonHtml($source,$is_list,$template_id,$is_custom = 0){
|
|
251
|
$type = $this->getType($source,$is_list,$template_id,$is_custom);
|
251
|
$type = $this->getType($source,$is_list,$template_id,$is_custom);
|
|
252
|
$data = [
|
252
|
$data = [
|
|
253
|
'template_id' => $template_id,
|
253
|
'template_id' => $template_id,
|
|
@@ -440,7 +440,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -440,7 +440,7 @@ class BTemplateLogic extends BaseLogic |
|
440
|
* @method :post
|
440
|
* @method :post
|
|
441
|
* @time :2023/10/21 17:29
|
441
|
* @time :2023/10/21 17:29
|
|
442
|
*/
|
442
|
*/
|
|
443
|
- public function getType($source,$is_list,$template_id,$is_custom){
|
443
|
+ public function getType($source,$is_list,$template_id,$is_custom = 0){
|
|
444
|
$type = BTemplate::SOURCE_HOME;//首页公共头部底部
|
444
|
$type = BTemplate::SOURCE_HOME;//首页公共头部底部
|
|
445
|
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
|
445
|
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
|
|
446
|
if($is_custom == BTemplate::IS_CUSTOM){//拓展模块为首页头部
|
446
|
if($is_custom == BTemplate::IS_CUSTOM){//拓展模块为首页头部
|