|
...
|
...
|
@@ -114,14 +114,10 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$condition = ['common_type'=>BTemplate::COMMON_HEAD,'source'=>'','is_list'=>$is_list,'is_custom'=>$is_custom,'template_id'=>$template_id];
|
|
|
|
$headComInfo = $this->getHeadComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
|
|
$bTemplateComModel = new BTemplateCom();
|
|
|
|
$condition['common_type'] = BTemplate::COMMON_OTHER;
|
|
|
|
$condition['source'] = $headComInfo['source'];
|
|
|
|
$condition['is_list'] = $headComInfo['is_list'];
|
|
|
|
$otherInfo = $bTemplateComModel->read($condition);
|
|
|
|
$otherInfo = $bTemplateComModel->read(['source'=>$headComInfo['source'],'common_type'=>BTemplate::COMMON_OTHER,'is_list'=>$headComInfo['is_list'],'is_custom'=>$headComInfo['is_custom']]);
|
|
|
|
if($otherInfo === false){
|
|
|
|
$this->fail('获取失败,请联系管理员222');
|
|
|
|
}
|
|
|
|
$condition['is_list'] = $is_list;
|
|
|
|
$footerComInfo = $this->getFooterComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
|
|
$data = ['head_html'=>$headComInfo['html'] ?? '', 'head_style'=>$headComInfo['html_style'] ?? '', 'other'=>$otherInfo['html'] ?? '',
|
|
|
|
'footer_html'=>$footerComInfo['html'] ?? '','footer_style'=>$footerComInfo['html_style'] ?? ''];
|
|
...
|
...
|
@@ -143,11 +139,9 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$headComInfo = $bTemplateComModel->read($condition);
|
|
|
|
if($headComInfo === false){
|
|
|
|
//取默认公共的
|
|
|
|
$condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
$condition['is_list'] = BTemplate::IS_DETAIL;
|
|
|
|
$headComInfo = $bTemplateComModel->read($condition);
|
|
|
|
$headComInfo = $bTemplateComModel->read(['source'=>BTemplate::SOURCE_COM,'common_type'=>BTemplate::COMMON_HEAD]);
|
|
|
|
if($headComInfo === false){
|
|
|
|
$this->fail('获取失败,请联系管理员1111');
|
|
|
|
$this->fail('获取失败,请联系管理员111');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($headComInfo);
|
|
...
|
...
|
@@ -166,9 +160,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$footerComInfo = $bTemplateComModel->read($condition);
|
|
|
|
if($footerComInfo === false){
|
|
|
|
//取默认首页的
|
|
|
|
$condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
$condition['is_list'] = BTemplate::IS_DETAIL;
|
|
|
|
$footerComInfo = $bTemplateComModel->read($condition);
|
|
|
|
$footerComInfo = $bTemplateComModel->read(['source'=>BTemplate::SOURCE_COM,'common_type'=>BTemplate::COMMON_FOOTER]);
|
|
|
|
if($footerComInfo === false){
|
|
|
|
$this->fail('获取失败,请联系管理员');
|
|
|
|
}
|
...
|
...
|
|