|
...
|
...
|
@@ -80,14 +80,14 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$mainInfo = $this->getMAinHtml($this->param['source'],$is_custom,$is_list);//获取中间部分代码
|
|
|
|
}else{
|
|
|
|
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
|
|
|
|
$type = $this->getHeaderType($this->param['source'], $is_list);//获取头部底部类型
|
|
|
|
$type = $this->getCustomizedType($this->param['source'], $is_list);//获取头部底部类型
|
|
|
|
$commonInfo = $this->getCommonHtml($type,$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']]);
|
|
|
|
}
|
|
|
|
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
|
|
|
|
}
|
|
|
|
$type = $this->getHeaderType($this->param['source'], $is_list);//获取头部底部类型
|
|
|
|
$type = $this->getCustomizedType($this->param['source'], $is_list);//获取头部底部类型
|
|
|
|
$commonInfo = $this->getCommonHtml($type,$is_list,$template_id);//获取定制头部
|
|
|
|
$html = $commonInfo['head_css'].$mainInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
|
|
|
|
$commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
|
|
...
|
...
|
@@ -184,43 +184,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :独立头部获取头部底部类型
|
|
|
|
* @name :getHeaderType
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/27 11:36
|
|
|
|
*/
|
|
|
|
public function getHeaderType($type,$is_list){
|
|
|
|
$resultType = BTemplate::SOURCE_HOME;
|
|
|
|
if($type == BTemplate::SOURCE_PRODUCT){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$resultType = BTemplate::TYPE_THREE;
|
|
|
|
}else{
|
|
|
|
$resultType = BTemplate::TYPE_TWO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($type == BTemplate::SOURCE_BLOG){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$resultType = BTemplate::TYPE_FIVE;
|
|
|
|
}else{
|
|
|
|
$resultType = BTemplate::TYPE_FOUR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($type == BTemplate::SOURCE_NEWS){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$resultType = BTemplate::TYPE_SEVEN;
|
|
|
|
}else{
|
|
|
|
$resultType = BTemplate::TYPE_SIX;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($type == BTemplate::SOURCE_KEYWORD){
|
|
|
|
$resultType = BTemplate::TYPE_EIGHT;
|
|
|
|
}
|
|
|
|
return $this->success($resultType);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :定制界面根据source获取type类型
|
|
|
|
* @remark :根据source获取type类型
|
|
|
|
* @name :getType
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
...
|
...
|
|