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