|
@@ -114,14 +114,10 @@ class BTemplateLogic extends BaseLogic |
|
@@ -114,14 +114,10 @@ class BTemplateLogic extends BaseLogic |
|
114
|
$condition = ['common_type'=>BTemplate::COMMON_HEAD,'source'=>'','is_list'=>$is_list,'is_custom'=>$is_custom,'template_id'=>$template_id];
|
114
|
$condition = ['common_type'=>BTemplate::COMMON_HEAD,'source'=>'','is_list'=>$is_list,'is_custom'=>$is_custom,'template_id'=>$template_id];
|
|
115
|
$headComInfo = $this->getHeadComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
115
|
$headComInfo = $this->getHeadComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
116
|
$bTemplateComModel = new BTemplateCom();
|
116
|
$bTemplateComModel = new BTemplateCom();
|
|
117
|
- $condition['common_type'] = BTemplate::COMMON_OTHER;
|
|
|
|
118
|
- $condition['source'] = $headComInfo['source'];
|
|
|
|
119
|
- $condition['is_list'] = $headComInfo['is_list'];
|
|
|
|
120
|
- $otherInfo = $bTemplateComModel->read($condition);
|
117
|
+ $otherInfo = $bTemplateComModel->read(['source'=>$headComInfo['source'],'common_type'=>BTemplate::COMMON_OTHER,'is_list'=>$headComInfo['is_list'],'is_custom'=>$headComInfo['is_custom']]);
|
|
121
|
if($otherInfo === false){
|
118
|
if($otherInfo === false){
|
|
122
|
$this->fail('获取失败,请联系管理员222');
|
119
|
$this->fail('获取失败,请联系管理员222');
|
|
123
|
}
|
120
|
}
|
|
124
|
- $condition['is_list'] = $is_list;
|
|
|
|
125
|
$footerComInfo = $this->getFooterComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
121
|
$footerComInfo = $this->getFooterComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
126
|
$data = ['head_html'=>$headComInfo['html'] ?? '', 'head_style'=>$headComInfo['html_style'] ?? '', 'other'=>$otherInfo['html'] ?? '',
|
122
|
$data = ['head_html'=>$headComInfo['html'] ?? '', 'head_style'=>$headComInfo['html_style'] ?? '', 'other'=>$otherInfo['html'] ?? '',
|
|
127
|
'footer_html'=>$footerComInfo['html'] ?? '','footer_style'=>$footerComInfo['html_style'] ?? ''];
|
123
|
'footer_html'=>$footerComInfo['html'] ?? '','footer_style'=>$footerComInfo['html_style'] ?? ''];
|
|
@@ -143,11 +139,9 @@ class BTemplateLogic extends BaseLogic |
|
@@ -143,11 +139,9 @@ class BTemplateLogic extends BaseLogic |
|
143
|
$headComInfo = $bTemplateComModel->read($condition);
|
139
|
$headComInfo = $bTemplateComModel->read($condition);
|
|
144
|
if($headComInfo === false){
|
140
|
if($headComInfo === false){
|
|
145
|
//取默认公共的
|
141
|
//取默认公共的
|
|
146
|
- $condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
147
|
- $condition['is_list'] = BTemplate::IS_DETAIL;
|
|
|
|
148
|
- $headComInfo = $bTemplateComModel->read($condition);
|
142
|
+ $headComInfo = $bTemplateComModel->read(['source'=>BTemplate::SOURCE_COM,'common_type'=>BTemplate::COMMON_HEAD]);
|
|
149
|
if($headComInfo === false){
|
143
|
if($headComInfo === false){
|
|
150
|
- $this->fail('获取失败,请联系管理员1111');
|
144
|
+ $this->fail('获取失败,请联系管理员111');
|
|
151
|
}
|
145
|
}
|
|
152
|
}
|
146
|
}
|
|
153
|
return $this->success($headComInfo);
|
147
|
return $this->success($headComInfo);
|
|
@@ -166,9 +160,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -166,9 +160,7 @@ class BTemplateLogic extends BaseLogic |
|
166
|
$footerComInfo = $bTemplateComModel->read($condition);
|
160
|
$footerComInfo = $bTemplateComModel->read($condition);
|
|
167
|
if($footerComInfo === false){
|
161
|
if($footerComInfo === false){
|
|
168
|
//取默认首页的
|
162
|
//取默认首页的
|
|
169
|
- $condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
170
|
- $condition['is_list'] = BTemplate::IS_DETAIL;
|
|
|
|
171
|
- $footerComInfo = $bTemplateComModel->read($condition);
|
163
|
+ $footerComInfo = $bTemplateComModel->read(['source'=>BTemplate::SOURCE_COM,'common_type'=>BTemplate::COMMON_FOOTER]);
|
|
172
|
if($footerComInfo === false){
|
164
|
if($footerComInfo === false){
|
|
173
|
$this->fail('获取失败,请联系管理员');
|
165
|
$this->fail('获取失败,请联系管理员');
|
|
174
|
}
|
166
|
}
|