|
@@ -11,7 +11,7 @@ use App\Models\Product\Category; |
|
@@ -11,7 +11,7 @@ use App\Models\Product\Category; |
|
11
|
use App\Models\Project\PageSetting;
|
11
|
use App\Models\Project\PageSetting;
|
|
12
|
use App\Models\RouteMap\RouteMap;
|
12
|
use App\Models\RouteMap\RouteMap;
|
|
13
|
use App\Models\Service\Service as ServiceSettingModel;
|
13
|
use App\Models\Service\Service as ServiceSettingModel;
|
|
14
|
-use App\Models\Template\BTemplateCommon;
|
14
|
+use App\Models\Template\BTemplateCom;
|
|
15
|
use App\Models\Template\BTemplateMain;
|
15
|
use App\Models\Template\BTemplateMain;
|
|
16
|
use App\Models\Template\Setting;
|
16
|
use App\Models\Template\Setting;
|
|
17
|
use App\Models\Template\BTemplate;
|
17
|
use App\Models\Template\BTemplate;
|
|
@@ -63,11 +63,11 @@ class BTemplateLogic extends BaseLogic |
|
@@ -63,11 +63,11 @@ class BTemplateLogic extends BaseLogic |
|
63
|
$is_list = $this->param['is_list'] ?? 0;//是否为列表页
|
63
|
$is_list = $this->param['is_list'] ?? 0;//是否为列表页
|
|
64
|
$template_id = $this->getSettingTemplate($this->param['source'],$is_list,$is_custom);//设置的模版id
|
64
|
$template_id = $this->getSettingTemplate($this->param['source'],$is_list,$is_custom);//设置的模版id
|
|
65
|
$templateInfo = $this->webTemplateInfo($this->param['source'],$this->param['source_id'],$template_id,$is_custom,$is_list);
|
65
|
$templateInfo = $this->webTemplateInfo($this->param['source'],$this->param['source_id'],$template_id,$is_custom,$is_list);
|
|
66
|
- if($templateInfo === false){
|
66
|
+ if($templateInfo === false){//todo::无装修数据处理
|
|
67
|
if($this->user['is_customized'] == BTemplate::IS_VISUALIZATION){//处理定制页面初始数据
|
67
|
if($this->user['is_customized'] == BTemplate::IS_VISUALIZATION){//处理定制页面初始数据
|
|
68
|
- $html = $this->customizedReturnHtml($this->param['source'],$template_id,$is_custom,$is_list);
|
|
|
|
69
|
- if($html !== false){
|
|
|
|
70
|
- return $this->success($html);
|
68
|
+ $data = $this->customizedReturnHtml($this->param['source'],$template_id,$is_custom,$is_list);
|
|
|
|
69
|
+ if($data !== false){
|
|
|
|
70
|
+ return $this->success($data);
|
|
71
|
}
|
71
|
}
|
|
72
|
}
|
72
|
}
|
|
73
|
//非定制初始中间部分
|
73
|
//非定制初始中间部分
|
|
@@ -78,15 +78,87 @@ class BTemplateLogic extends BaseLogic |
|
@@ -78,15 +78,87 @@ class BTemplateLogic extends BaseLogic |
|
78
|
}
|
78
|
}
|
|
79
|
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
|
79
|
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
|
|
80
|
}
|
80
|
}
|
|
81
|
- $commonInfo = $this->getCommonHtml($this->param['source'],$is_list,$template_id,$is_custom);//获取非定制头部
|
|
|
|
82
|
- $html = $commonInfo['head_css'].$mainInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other']. $commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
|
81
|
+ $commonInfo = $this->getTemplateComHtml($this->param['source'],$is_list,$is_custom,$template_id);//获取非定制头部
|
|
|
|
82
|
+ $html = $commonInfo['head_style'].$mainInfo['main_css'].$commonInfo['footer_style'].$commonInfo['other']. $commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
|
|
83
|
$html = $this->getHeadFooter($html);
|
83
|
$html = $this->getHeadFooter($html);
|
|
84
|
$result = ['html'=>$html,'template_id'=>$template_id];
|
84
|
$result = ['html'=>$html,'template_id'=>$template_id];
|
|
85
|
- if($templateInfo !== false) {$result['id'] = $templateInfo['id'];$result['updated_at'] = $templateInfo['updated_at'];}
|
85
|
+ if($templateInfo !== false) {
|
|
|
|
86
|
+ $result['id'] = $templateInfo['id'];
|
|
|
|
87
|
+ $result['updated_at'] = $templateInfo['updated_at'];
|
|
|
|
88
|
+ }
|
|
86
|
return $this->success($result);
|
89
|
return $this->success($result);
|
|
87
|
}
|
90
|
}
|
|
88
|
|
91
|
|
|
89
|
/**
|
92
|
/**
|
|
|
|
93
|
+ * @remark :非定制获取头部+底部
|
|
|
|
94
|
+ * @name :getTemplateComHtml
|
|
|
|
95
|
+ * @author :lyh
|
|
|
|
96
|
+ * @method :post
|
|
|
|
97
|
+ * @time :2024/4/29 16:53
|
|
|
|
98
|
+ */
|
|
|
|
99
|
+ public function getTemplateComHtml($source,$is_list,$is_custom,$template_id){
|
|
|
|
100
|
+ $condition = ['common_type'=>BTemplate::COMMON_HEAD,'source'=>'','is_list'=>$is_list,'is_custom'=>$is_custom,'template_id'=>$template_id];
|
|
|
|
101
|
+ $headComInfo = $this->getHeadComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
|
|
102
|
+ $bTemplateComModel = new BTemplateCom();
|
|
|
|
103
|
+ $condition['common_type'] = BTemplate::COMMON_OTHER;
|
|
|
|
104
|
+ $condition['source'] = $headComInfo['source'];
|
|
|
|
105
|
+ $otherInfo = $bTemplateComModel->read($condition);
|
|
|
|
106
|
+ if($otherInfo === false){
|
|
|
|
107
|
+ $this->fail('获取失败,请联系管理员');
|
|
|
|
108
|
+ }
|
|
|
|
109
|
+ $footerComInfo = $this->getFooterComHtml($condition,$source,$is_list,$is_custom,$template_id);
|
|
|
|
110
|
+ $data = ['head_html'=>$headComInfo['html'] ?? '', 'head_style'=>$headComInfo['html_style'] ?? '', 'other'=>$otherInfo['html'] ?? '',
|
|
|
|
111
|
+ 'footer_html'=>$footerComInfo['html'] ?? '','footer_style'=>$footerComInfo['html_style'] ?? ''];
|
|
|
|
112
|
+ return $this->success($data);
|
|
|
|
113
|
+ }
|
|
|
|
114
|
+
|
|
|
|
115
|
+ /**
|
|
|
|
116
|
+ * @remark :公共头部
|
|
|
|
117
|
+ * @name :HeadComHtml
|
|
|
|
118
|
+ * @author :lyh
|
|
|
|
119
|
+ * @method :post
|
|
|
|
120
|
+ * @time :2024/4/29 17:20
|
|
|
|
121
|
+ */
|
|
|
|
122
|
+ public function getHeadComHtml($condition,$source,$is_list,$is_custom,$template_id){
|
|
|
|
123
|
+ $commonHead = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_HEAD,$template_id);
|
|
|
|
124
|
+ $bTemplateComModel = new BTemplateCom();
|
|
|
|
125
|
+ $condition['source'] = $commonHead;
|
|
|
|
126
|
+ $condition['common_type'] = BTemplate::COMMON_HEAD;
|
|
|
|
127
|
+ $headComInfo = $bTemplateComModel->read($condition);
|
|
|
|
128
|
+ if($headComInfo === false){
|
|
|
|
129
|
+ //取默认公共的
|
|
|
|
130
|
+ $condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
131
|
+ $headComInfo = $bTemplateComModel->read($condition);
|
|
|
|
132
|
+ if($headComInfo === false){
|
|
|
|
133
|
+ $this->fail('获取失败,请联系管理员');
|
|
|
|
134
|
+ }
|
|
|
|
135
|
+ }
|
|
|
|
136
|
+ return $this->success($headComInfo);
|
|
|
|
137
|
+ }
|
|
|
|
138
|
+ /**
|
|
|
|
139
|
+ * @remark :公共底部
|
|
|
|
140
|
+ * @name :footerComHtml
|
|
|
|
141
|
+ * @author :lyh
|
|
|
|
142
|
+ * @method :post
|
|
|
|
143
|
+ * @time :2024/4/29 17:18
|
|
|
|
144
|
+ */
|
|
|
|
145
|
+ public function getFooterComHtml($condition,$source,$is_list,$is_custom,$template_id){
|
|
|
|
146
|
+ $bTemplateComModel = new BTemplateCom();
|
|
|
|
147
|
+ $condition['common_type'] = BTemplate::COMMON_FOOTER;
|
|
|
|
148
|
+ $condition['source'] = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_FOOTER,$template_id);
|
|
|
|
149
|
+ $footerComInfo = $bTemplateComModel->read($condition);
|
|
|
|
150
|
+ if($footerComInfo === false){
|
|
|
|
151
|
+ //取默认首页的
|
|
|
|
152
|
+ $condition['source'] = BTemplate::SOURCE_COM;
|
|
|
|
153
|
+ $footerComInfo = $bTemplateComModel->read($condition);
|
|
|
|
154
|
+ if($footerComInfo === false){
|
|
|
|
155
|
+ $this->fail('获取失败,请联系管理员');
|
|
|
|
156
|
+ }
|
|
|
|
157
|
+ }
|
|
|
|
158
|
+ return $this->success($footerComInfo);
|
|
|
|
159
|
+ }
|
|
|
|
160
|
+
|
|
|
|
161
|
+ /**
|
|
90
|
* @remark :获取整个html代码
|
162
|
* @remark :获取整个html代码
|
|
91
|
* @name :getCustomizeAllHtml
|
163
|
* @name :getCustomizeAllHtml
|
|
92
|
* @author :lyh
|
164
|
* @author :lyh
|
|
@@ -95,11 +167,11 @@ class BTemplateLogic extends BaseLogic |
|
@@ -95,11 +167,11 @@ class BTemplateLogic extends BaseLogic |
|
95
|
*/
|
167
|
*/
|
|
96
|
public function getCustomizeAllHtml($templateInfo,$template_id,$is_custom,$is_list){
|
168
|
public function getCustomizeAllHtml($templateInfo,$template_id,$is_custom,$is_list){
|
|
97
|
if($is_custom == BTemplate::IS_CUSTOM){
|
169
|
if($is_custom == BTemplate::IS_CUSTOM){
|
|
98
|
- $commonInfo = $this->getCustomizedCommonHtml($this->param['source'],$is_custom,$is_list);//获取定制头部
|
170
|
+ $commonInfo = $this->getCustomizeTemplateComHtml($templateInfo['source'],$is_custom,$is_list);//获取定制头部
|
|
99
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
171
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
|
100
|
}else{
|
172
|
}else{
|
|
101
|
- $type = $this->getCustomizedType($this->param['source'],$is_list);
|
|
|
|
102
|
- $commonInfo = $this->getCustomizedCommonHtml($type,$is_custom,$is_list);//获取定制头部
|
173
|
+ $type = $this->getCustomizedType($templateInfo['source'],$is_list);
|
|
|
|
174
|
+ $commonInfo = $this->getCustomizeTemplateComHtml($type,$is_custom,$is_list);//获取定制头部
|
|
103
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
175
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
|
104
|
}
|
176
|
}
|
|
105
|
return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id'],'updated_at'=>$templateInfo['updated_at']]);
|
177
|
return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id'],'updated_at'=>$templateInfo['updated_at']]);
|
|
@@ -136,11 +208,12 @@ class BTemplateLogic extends BaseLogic |
|
@@ -136,11 +208,12 @@ class BTemplateLogic extends BaseLogic |
|
136
|
if($info === false){
|
208
|
if($info === false){
|
|
137
|
$this->fail('当前扩展模块不存在或已被删除');
|
209
|
$this->fail('当前扩展模块不存在或已被删除');
|
|
138
|
}
|
210
|
}
|
|
139
|
- //扩展模块定制
|
211
|
+ //扩展模块定制列表
|
|
140
|
if($is_list == BTemplate::IS_LIST && $info['list_customized'] == BTemplate::IS_VISUALIZATION){
|
212
|
if($is_list == BTemplate::IS_LIST && $info['list_customized'] == BTemplate::IS_VISUALIZATION){
|
|
141
|
$html = $this->customModuleCustomizeHtml($source,$is_list,$is_custom);
|
213
|
$html = $this->customModuleCustomizeHtml($source,$is_list,$is_custom);
|
|
142
|
return $this->success(['html'=>$html,'template_id'=>$template_id]);
|
214
|
return $this->success(['html'=>$html,'template_id'=>$template_id]);
|
|
143
|
}
|
215
|
}
|
|
|
|
216
|
+ //扩展模块定制详情
|
|
144
|
if($is_list == BTemplate::IS_DETAIL && $info['detail_customized'] == BTemplate::IS_VISUALIZATION){
|
217
|
if($is_list == BTemplate::IS_DETAIL && $info['detail_customized'] == BTemplate::IS_VISUALIZATION){
|
|
145
|
$html = $this->customModuleCustomizeHtml($source,$is_list,$is_custom);
|
218
|
$html = $this->customModuleCustomizeHtml($source,$is_list,$is_custom);
|
|
146
|
return $this->success(['html'=>$html,'template_id'=>$template_id]);
|
219
|
return $this->success(['html'=>$html,'template_id'=>$template_id]);
|
|
@@ -169,7 +242,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -169,7 +242,7 @@ class BTemplateLogic extends BaseLogic |
|
169
|
if($customHtmlInfo === false){
|
242
|
if($customHtmlInfo === false){
|
|
170
|
$this->fail('定制页面,请先上传代码块');
|
243
|
$this->fail('定制页面,请先上传代码块');
|
|
171
|
}
|
244
|
}
|
|
172
|
- $commonInfo = $this->getCustomizedCommonHtml($source,$is_custom,$is_list);//获取定制头部
|
245
|
+ $commonInfo = $this->getCustomizeTemplateComHtml($source,$is_custom,$is_list);//获取定制头部
|
|
173
|
if($commonInfo !== false){
|
246
|
if($commonInfo !== false){
|
|
174
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
247
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
|
175
|
}
|
248
|
}
|
|
@@ -249,7 +322,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -249,7 +322,7 @@ class BTemplateLogic extends BaseLogic |
|
249
|
if($customHtmlInfo === false){
|
322
|
if($customHtmlInfo === false){
|
|
250
|
$this->fail('定制页面,请先上传代码块');
|
323
|
$this->fail('定制页面,请先上传代码块');
|
|
251
|
}
|
324
|
}
|
|
252
|
- $commonInfo = $this->getCustomizedCommonHtml($type,$is_custom,$is_list);//获取定制头部
|
325
|
+ $commonInfo = $this->getCustomizeTemplateComHtml($type,$is_custom,$is_list);//获取定制头部
|
|
253
|
if($commonInfo !== false){
|
326
|
if($commonInfo !== false){
|
|
254
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
327
|
$customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
|
|
255
|
}
|
328
|
}
|
|
@@ -265,49 +338,25 @@ class BTemplateLogic extends BaseLogic |
|
@@ -265,49 +338,25 @@ class BTemplateLogic extends BaseLogic |
|
265
|
* @method :post
|
338
|
* @method :post
|
|
266
|
* @time :2023/12/29 13:13
|
339
|
* @time :2023/12/29 13:13
|
|
267
|
*/
|
340
|
*/
|
|
268
|
- public function getCustomizedCommonHtml($type,$is_custom = 0,$is_list = 0){
|
|
|
|
269
|
- $data = [
|
|
|
|
270
|
- 'template_id' => 0,
|
|
|
|
271
|
- 'project_id' => $this->user['project_id'],
|
|
|
|
272
|
- 'type'=>$type,
|
|
|
|
273
|
- 'is_custom'=>$is_custom,
|
|
|
|
274
|
- 'is_list'=>$is_list
|
|
|
|
275
|
- ];
|
|
|
|
276
|
- $commonTemplateModel = new BTemplateCommon();
|
|
|
|
277
|
- return $commonTemplateModel->read($data);
|
|
|
|
278
|
- }
|
|
|
|
279
|
-
|
|
|
|
280
|
- /**
|
|
|
|
281
|
- * @remark :定制页面头部类型---根据source获取type类型
|
|
|
|
282
|
- * @name :getType
|
|
|
|
283
|
- * @author :lyh
|
|
|
|
284
|
- * @method :post
|
|
|
|
285
|
- * @time :2023/11/16 11:20
|
|
|
|
286
|
- */
|
|
|
|
287
|
- public function getCustomizedType($source,$is_list){
|
|
|
|
288
|
- $type = BTemplate::TYPE_HOME;
|
|
|
|
289
|
- if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
290
|
- if($is_list == BTemplate::IS_LIST){
|
|
|
|
291
|
- $type = BTemplate::TYPE_PRODUCT_LIST;
|
341
|
+ public function getCustomizeTemplateComHtml($type,$is_custom,$is_list,$template_id = 0){
|
|
|
|
342
|
+ $data = ['head_html'=>'','head_style'=>'','footer_html'=>'','footer_style'=>'','other'=>''];
|
|
|
|
343
|
+ $param = ['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>$type,'is_custom'=>$is_custom,'is_list'=>$is_list];
|
|
|
|
344
|
+ $commonTemplateModel = new BTemplateCom();
|
|
|
|
345
|
+ $commonList = $commonTemplateModel->list($param);
|
|
|
|
346
|
+ if(!empty($commonList)){
|
|
|
|
347
|
+ foreach ($commonList as $v){
|
|
|
|
348
|
+ if($v['common_type'] == BTemplate::COMMON_HEAD){
|
|
|
|
349
|
+ $data['head_html'] = $v['html'];
|
|
|
|
350
|
+ $data['head_style'] = $v['html_style'];
|
|
|
|
351
|
+ }elseif ($v['common_type'] == BTemplate::COMMON_FOOTER){
|
|
|
|
352
|
+ $data['footer_html'] = $v['html'];
|
|
|
|
353
|
+ $data['footer_style'] = $v['html_style'];
|
|
292
|
}else{
|
354
|
}else{
|
|
293
|
- $type = BTemplate::TYPE_PRODUCT_DETAIL;
|
355
|
+ $data['other'] = $v['html'];
|
|
294
|
}
|
356
|
}
|
|
295
|
}
|
357
|
}
|
|
296
|
- if($source == BTemplate::SOURCE_BLOG){
|
|
|
|
297
|
- if($is_list == BTemplate::IS_LIST){
|
|
|
|
298
|
- $type = BTemplate::TYPE_BLOG_LIST;
|
|
|
|
299
|
- }else{
|
|
|
|
300
|
- $type = BTemplate::TYPE_BLOG_DETAIL;
|
|
|
|
301
|
- }
|
|
|
|
302
|
}
|
358
|
}
|
|
303
|
- if($source == BTemplate::SOURCE_NEWS){
|
|
|
|
304
|
- if($is_list == BTemplate::IS_LIST){
|
|
|
|
305
|
- $type = BTemplate::TYPE_NEWS_LIST;
|
|
|
|
306
|
- }else{
|
|
|
|
307
|
- $type = BTemplate::TYPE_NEWS_DETAIL;
|
|
|
|
308
|
- }
|
|
|
|
309
|
- }
|
|
|
|
310
|
- return $type;
|
359
|
+ return $this->success($data);
|
|
311
|
}
|
360
|
}
|
|
312
|
|
361
|
|
|
313
|
/**
|
362
|
/**
|
|
@@ -346,38 +395,10 @@ class BTemplateLogic extends BaseLogic |
|
@@ -346,38 +395,10 @@ class BTemplateLogic extends BaseLogic |
|
346
|
if($info === false){
|
395
|
if($info === false){
|
|
347
|
$this->fail('请先选择模版');
|
396
|
$this->fail('请先选择模版');
|
|
348
|
}
|
397
|
}
|
|
349
|
- $template_id = $info['template_id'];
|
|
|
|
350
|
- return $this->success($template_id);
|
398
|
+ return $this->success($info['template_id']);
|
|
351
|
}
|
399
|
}
|
|
352
|
|
400
|
|
|
353
|
/**
|
401
|
/**
|
|
354
|
- * @remark :根据类型获取公共头和底
|
|
|
|
355
|
- * @name :getCommonPage
|
|
|
|
356
|
- * @author :lyh
|
|
|
|
357
|
- * @method :post
|
|
|
|
358
|
- * @time :2023/10/21 16:55
|
|
|
|
359
|
- */
|
|
|
|
360
|
- public function getCommonHtml($source,$is_list,$template_id,$is_custom = 0){
|
|
|
|
361
|
- $type = $this->getType($source,$is_list,$is_custom);
|
|
|
|
362
|
- $data = [
|
|
|
|
363
|
- 'template_id' => $template_id,
|
|
|
|
364
|
- 'project_id' => $this->user['project_id'],
|
|
|
|
365
|
- 'type'=>$type,
|
|
|
|
366
|
- 'is_custom'=>0,
|
|
|
|
367
|
- ];
|
|
|
|
368
|
- $commonTemplateModel = new BTemplateCommon();
|
|
|
|
369
|
- $commonInfo = $commonTemplateModel->read($data);
|
|
|
|
370
|
- if($commonInfo === false){
|
|
|
|
371
|
- $data['type'] = BTemplate::SOURCE_HOME;
|
|
|
|
372
|
- $commonInfo = $commonTemplateModel->read($data);
|
|
|
|
373
|
- }
|
|
|
|
374
|
- return $this->success($commonInfo);
|
|
|
|
375
|
- }
|
|
|
|
376
|
-
|
|
|
|
377
|
-
|
|
|
|
378
|
-
|
|
|
|
379
|
-
|
|
|
|
380
|
- /**
|
|
|
|
381
|
* @remark :保存修改后的模版
|
402
|
* @remark :保存修改后的模版
|
|
382
|
* @name :templateSave
|
403
|
* @name :templateSave
|
|
383
|
* @author :lyh
|
404
|
* @author :lyh
|
|
@@ -404,14 +425,12 @@ class BTemplateLogic extends BaseLogic |
|
@@ -404,14 +425,12 @@ class BTemplateLogic extends BaseLogic |
|
404
|
'is_custom'=>$this->param['is_custom'], 'template_id'=>$this->param['template_id'],
|
425
|
'is_custom'=>$this->param['is_custom'], 'template_id'=>$this->param['template_id'],
|
|
405
|
'is_list'=>$this->param['is_list']
|
426
|
'is_list'=>$this->param['is_list']
|
|
406
|
];
|
427
|
];
|
|
407
|
- $data = [
|
|
|
|
408
|
- 'section_list_id'=>$this->param['section_list_id']
|
|
|
|
409
|
- ];
|
428
|
+ $data = ['section_list_id'=>$this->param['section_list_id']];
|
|
410
|
$data = $this->handleVisualizationParam($this->param['html'],$this->param['source'],$this->param['is_list'],$this->param['is_custom'],$data);
|
429
|
$data = $this->handleVisualizationParam($this->param['html'],$this->param['source'],$this->param['is_list'],$this->param['is_custom'],$data);
|
|
411
|
$this->model->edit($data,$condition);
|
430
|
$this->model->edit($data,$condition);
|
|
412
|
}
|
431
|
}
|
|
413
|
//更新头部信息
|
432
|
//更新头部信息
|
|
414
|
- $this->saveCommonHtml($this->param['html'],$this->param['source'],$this->param['is_list'],$this->param['template_id'],$this->param['is_custom']);
|
433
|
+ $this->saveTemplateCom($this->param['html'],$this->param['template_id'],$this->param['source'],$this->param['is_list'],$this->param['is_custom']);
|
|
415
|
$this->setOperationRecords($this->param['html'],$this->param['source'],$this->param['source_id'],$this->param['template_id'],$this->param['is_custom'],$this->param['is_list']);
|
434
|
$this->setOperationRecords($this->param['html'],$this->param['source'],$this->param['source_id'],$this->param['template_id'],$this->param['is_custom'],$this->param['is_list']);
|
|
416
|
//通知更新
|
435
|
//通知更新
|
|
417
|
$this->homeOrProduct($this->param['source'],$this->param['source_id'],$this->param['is_custom'],$this->param['is_list']);
|
436
|
$this->homeOrProduct($this->param['source'],$this->param['source_id'],$this->param['is_custom'],$this->param['is_list']);
|
|
@@ -441,14 +460,6 @@ class BTemplateLogic extends BaseLogic |
|
@@ -441,14 +460,6 @@ class BTemplateLogic extends BaseLogic |
|
441
|
* @time :2023/12/15 10:59
|
460
|
* @time :2023/12/15 10:59
|
|
442
|
*/
|
461
|
*/
|
|
443
|
public function handleVisualizationParam($html,$source, $is_list,$is_custom,$data){
|
462
|
public function handleVisualizationParam($html,$source, $is_list,$is_custom,$data){
|
|
444
|
- if($this->user['is_customized'] == BTemplate::IS_VISUALIZATION){//定制项目
|
|
|
|
445
|
- $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
|
|
|
446
|
- //查看当前页面是否定制,是否开启可视化
|
|
|
|
447
|
- $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
|
|
448
|
- if (in_array($type, $page_array)) {//当前页面是定制界面
|
|
|
|
449
|
- $data['html'] = $html;
|
|
|
|
450
|
- $data['type'] = BTemplate::ALL_HTML;
|
|
|
|
451
|
- }else{
|
|
|
|
452
|
//TODO::扩展模块定制单独处理
|
463
|
//TODO::扩展模块定制单独处理
|
|
453
|
if($is_custom == BTemplate::IS_CUSTOM){
|
464
|
if($is_custom == BTemplate::IS_CUSTOM){
|
|
454
|
$customModuleModel = new CustomModule();
|
465
|
$customModuleModel = new CustomModule();
|
|
@@ -460,100 +471,59 @@ class BTemplateLogic extends BaseLogic |
|
@@ -460,100 +471,59 @@ class BTemplateLogic extends BaseLogic |
|
460
|
if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
|
471
|
if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
|
|
461
|
$data['html'] = $html;
|
472
|
$data['html'] = $html;
|
|
462
|
$data['type'] = BTemplate::ALL_HTML;
|
473
|
$data['type'] = BTemplate::ALL_HTML;
|
|
|
|
474
|
+ return $this->success($data);
|
|
463
|
}
|
475
|
}
|
|
464
|
}
|
476
|
}
|
|
465
|
- $mainInfo = $this->handleTemplateHtml($html);
|
|
|
|
466
|
- $data['main_html'] = $mainInfo['main_html'];
|
|
|
|
467
|
- $data['main_css'] = $mainInfo['main_css'];
|
477
|
+ if($this->user['is_customized'] == BTemplate::IS_VISUALIZATION){
|
|
|
|
478
|
+ $type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
|
|
|
479
|
+ $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
|
|
480
|
+ if(in_array($type, $page_array)){
|
|
|
|
481
|
+ $data['html'] = $html;
|
|
|
|
482
|
+ $data['type'] = BTemplate::ALL_HTML;
|
|
|
|
483
|
+ return $this->success($data);
|
|
468
|
}
|
484
|
}
|
|
469
|
- }else{
|
|
|
|
470
|
- $mainInfo = $this->handleTemplateHtml($html);
|
|
|
|
471
|
- $data['main_html'] = $mainInfo['main_html'];
|
|
|
|
472
|
- $data['main_css'] = $mainInfo['main_css'];
|
|
|
|
473
|
}
|
485
|
}
|
|
474
|
- return $data;
|
486
|
+ $data['main_html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s');
|
|
|
|
487
|
+ $data['main_css'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
|
|
|
|
488
|
+ return $this->success($data);
|
|
475
|
}
|
489
|
}
|
|
476
|
|
490
|
|
|
477
|
/**
|
491
|
/**
|
|
478
|
- * @remark :保存公共头部底部
|
|
|
|
479
|
- * @name :saveCommonHtml
|
492
|
+ * @remark :保存公共部分(头部。底部。连接部分)
|
|
|
|
493
|
+ * @name :saveTemplateCom
|
|
480
|
* @author :lyh
|
494
|
* @author :lyh
|
|
481
|
* @method :post
|
495
|
* @method :post
|
|
482
|
- * @time :2023/12/13 17:05
|
496
|
+ * @time :2024/4/29 10:32
|
|
483
|
*/
|
497
|
*/
|
|
484
|
- public function saveCommonHtml($html,$source,$is_list,$template_id,$is_custom){
|
|
|
|
485
|
- //TODO::定制扩展模块单独处理
|
|
|
|
486
|
- if($is_custom == BTemplate::IS_CUSTOM){
|
|
|
|
487
|
- $code = $this->saveCustomModuleCommonHtml($html,$source,$is_custom,$is_list,$template_id);
|
|
|
|
488
|
- if($code === false){
|
|
|
|
489
|
- return $this->success();
|
|
|
|
490
|
- }
|
|
|
|
491
|
- }
|
|
|
|
492
|
- //todo::其他情况
|
|
|
|
493
|
- $type = $this->getType($source,$is_list,$is_custom);//获取头部类型1-9(首页到自定义页面)
|
|
|
|
494
|
- if($template_id == 0){//定制页面默认为独立头部
|
|
|
|
495
|
- $type = $this->getCustomizedType($source,$is_list);//定制默认独立头部
|
|
|
|
496
|
- }
|
|
|
|
497
|
- $templateCommonModel = new BTemplateCommon();
|
|
|
|
498
|
- $commonInfo = $templateCommonModel->read(['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>$type,'is_custom'=>0]);//查看当前头部是否存在
|
498
|
+ public function saveTemplateCom($html,$template_id,$source,$is_list,$is_custom){
|
|
|
|
499
|
+ $typeArr = [BTemplate::COMMON_HEAD, BTemplate::COMMON_FOOTER, BTemplate::COMMON_OTHER];
|
|
499
|
$handleInfo = $this->handleCommonParam($html);
|
500
|
$handleInfo = $this->handleCommonParam($html);
|
|
500
|
- if($commonInfo === false){
|
|
|
|
501
|
- $data = [
|
|
|
|
502
|
- 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'],'other'=>$handleInfo['other'],
|
|
|
|
503
|
- 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'],
|
|
|
|
504
|
- 'type'=>$type,'template_id'=>$template_id, 'project_id'=>$this->user['project_id'],
|
|
|
|
505
|
- ];
|
|
|
|
506
|
- $templateCommonModel->add($data);
|
501
|
+ $templateComModel = new BTemplateCom();
|
|
|
|
502
|
+ foreach ($typeArr as $type){
|
|
|
|
503
|
+ if($type == BTemplate::COMMON_HEAD){
|
|
|
|
504
|
+ $param['html'] = $handleInfo['head_html'];
|
|
|
|
505
|
+ $param['html_style'] = $handleInfo['head_style'];
|
|
|
|
506
|
+ $typeSource = $this->getType($source,$is_list,$is_custom,$type,$template_id);//头部是否为独立头部
|
|
|
|
507
|
+ }elseif ($type == BTemplate::COMMON_FOOTER){
|
|
|
|
508
|
+ $param['html'] = $handleInfo['footer_html'];
|
|
|
|
509
|
+ $param['html_style'] = $handleInfo['footer_style'];
|
|
|
|
510
|
+ $typeSource = $this->getType($source,$is_list,$is_custom,$type,$template_id);
|
|
507
|
}else{
|
511
|
}else{
|
|
508
|
- $data = [
|
|
|
|
509
|
- 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'],'other'=>$handleInfo['other'],
|
|
|
|
510
|
- 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'],
|
|
|
|
511
|
- ];
|
|
|
|
512
|
- $templateCommonModel->edit($data,['id'=>$commonInfo['id']]);
|
|
|
|
513
|
- }
|
|
|
|
514
|
- //更新所有界面的other
|
|
|
|
515
|
- if($template_id != 0){
|
|
|
|
516
|
- return $templateCommonModel->edit(['other'=>$handleInfo['other']],['project_id'=>$this->user['project_id'],'template_id'=>$template_id]);
|
512
|
+ $param['html'] = $handleInfo['other'];
|
|
|
|
513
|
+ $param['html_style'] = null;
|
|
|
|
514
|
+ $typeSource = $this->getType($source,$is_list,$is_custom,BTemplate::COMMON_HEAD,$template_id);
|
|
517
|
}
|
515
|
}
|
|
518
|
- }
|
|
|
|
519
|
-
|
|
|
|
520
|
- /**
|
|
|
|
521
|
- * @remark :扩展模块定制保存头部处理
|
|
|
|
522
|
- * @name :saveCustomModuleCommonHtml
|
|
|
|
523
|
- * @author :lyh
|
|
|
|
524
|
- * @method :post
|
|
|
|
525
|
- * @time :2024/1/10 11:33
|
|
|
|
526
|
- */
|
|
|
|
527
|
- public function saveCustomModuleCommonHtml($html,$source,$is_custom,$is_list,$template_id){
|
|
|
|
528
|
- $customModuleModel = new CustomModule();
|
|
|
|
529
|
- $info = $customModuleModel->read(['id'=>$source]);
|
516
|
+ //查看当前数据是否还存在
|
|
|
|
517
|
+ $condition = ['project_id'=>$this->user['project_id'],'template_id'=>$template_id,'is_list'=>$is_list,'is_custom'=>$is_custom,'source'=>$typeSource,'common_type'=>$type];
|
|
|
|
518
|
+ $info = $templateComModel->read($condition);
|
|
530
|
if($info === false){
|
519
|
if($info === false){
|
|
531
|
- $this->fail('当前扩展模块不存在或已被删除');
|
|
|
|
532
|
- }
|
|
|
|
533
|
- //todo::扩展模块(列表页/详情页)定制
|
|
|
|
534
|
- if($info['list_customized'] == BTemplate::IS_VISUALIZATION || $info['detail_customized'] == BTemplate::IS_VISUALIZATION) {
|
|
|
|
535
|
- $data = ['type'=>$source,'is_custom'=>$is_custom,'is_list'=>$is_list,'template_id'=>$template_id];
|
|
|
|
536
|
- $templateCommonModel = new BTemplateCommon();
|
|
|
|
537
|
- $commonInfo = $templateCommonModel->read($data);//查看当前头部是否存在
|
|
|
|
538
|
- $handleInfo = $this->handleCommonParam($html);
|
|
|
|
539
|
- if($commonInfo === false){
|
|
|
|
540
|
- $data = [
|
|
|
|
541
|
- 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'],'other'=>$handleInfo['other'],
|
|
|
|
542
|
- 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'],
|
|
|
|
543
|
- 'type'=>$source,'template_id'=>$template_id, 'project_id'=>$this->user['project_id'],
|
|
|
|
544
|
- 'is_custom'=>$is_custom,'is_list'=>$is_list,
|
|
|
|
545
|
- ];
|
|
|
|
546
|
- $templateCommonModel->add($data);
|
520
|
+ $data = array_merge($param,$condition);
|
|
|
|
521
|
+ $templateComModel->add($data);
|
|
547
|
}else{
|
522
|
}else{
|
|
548
|
- $data = [
|
|
|
|
549
|
- 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'],'other'=>$handleInfo['other'],
|
|
|
|
550
|
- 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'],
|
|
|
|
551
|
- ];
|
|
|
|
552
|
- $templateCommonModel->edit($data,['id'=>$commonInfo['id']]);
|
523
|
+ $templateComModel->edit($param,$condition);
|
|
553
|
}
|
524
|
}
|
|
554
|
- return false;
|
|
|
|
555
|
}
|
525
|
}
|
|
556
|
- return true;
|
526
|
+ return $this->success();
|
|
557
|
}
|
527
|
}
|
|
558
|
|
528
|
|
|
559
|
/**
|
529
|
/**
|
|
@@ -582,55 +552,43 @@ class BTemplateLogic extends BaseLogic |
|
@@ -582,55 +552,43 @@ class BTemplateLogic extends BaseLogic |
|
582
|
//字符串截取
|
552
|
//字符串截取
|
|
583
|
$param['head_html'] = characterTruncation($html,'/<header\b[^>]*>(.*?)<\/header>/s');
|
553
|
$param['head_html'] = characterTruncation($html,'/<header\b[^>]*>(.*?)<\/header>/s');
|
|
584
|
$param['footer_html'] = characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s');
|
554
|
$param['footer_html'] = characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s');
|
|
585
|
- $param['head_css'] = characterTruncation($html,'/<style id="globalsojs-header">(.*?)<\/style>/s');
|
|
|
|
586
|
- $param['footer_css'] = characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s');
|
555
|
+ $param['head_style'] = characterTruncation($html,'/<style id="globalsojs-header">(.*?)<\/style>/s');
|
|
|
|
556
|
+ $param['footer_style'] = characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s');
|
|
587
|
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
|
557
|
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
|
|
588
|
$param['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
558
|
$param['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
|
|
589
|
return $this->success($param);
|
559
|
return $this->success($param);
|
|
590
|
}
|
560
|
}
|
|
591
|
|
561
|
|
|
592
|
/**
|
562
|
/**
|
|
593
|
- * @remark :保存时字符串处理
|
|
|
|
594
|
- * @name :handleSaveParam
|
|
|
|
595
|
- * @author :lyh
|
|
|
|
596
|
- * @method :post
|
|
|
|
597
|
- * @time :2023/6/29 15:35
|
|
|
|
598
|
- */
|
|
|
|
599
|
- public function handleTemplateHtml($html){
|
|
|
|
600
|
- //字符串截取
|
|
|
|
601
|
- $param['main_html'] = characterTruncationStr($html,"<main","</main>");
|
|
|
|
602
|
- $param['main_css'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
|
|
|
|
603
|
- return $this->success($param);
|
|
|
|
604
|
- }
|
|
|
|
605
|
-
|
|
|
|
606
|
- /**
|
|
|
|
607
|
* @remark :(非定制)保存时获取获取设置的类型
|
563
|
* @remark :(非定制)保存时获取获取设置的类型
|
|
608
|
* @name :getType
|
564
|
* @name :getType
|
|
609
|
* @author :lyh
|
565
|
* @author :lyh
|
|
610
|
* @method :post
|
566
|
* @method :post
|
|
611
|
* @time :2023/10/21 17:29
|
567
|
* @time :2023/10/21 17:29
|
|
612
|
*/
|
568
|
*/
|
|
613
|
- public function getType($source,$is_list,$is_custom = 0){
|
|
|
|
614
|
- $type = BTemplate::SOURCE_HOME;//首页公共头部底部
|
569
|
+ public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$CommonType = BTemplate::COMMON_HEAD,$template_id = 0){
|
|
|
|
570
|
+ if($template_id == 0){
|
|
|
|
571
|
+ return $this->success($source);
|
|
|
|
572
|
+ }
|
|
|
|
573
|
+ $type = BTemplate::SOURCE_COM;//公共头部底部
|
|
615
|
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
|
574
|
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
|
|
616
|
- if($is_custom == BTemplate::IS_CUSTOM){//拓展模块为首页头部
|
575
|
+ if($is_custom == BTemplate::IS_CUSTOM || $is_head == BTemplate::IS_NO_HEADER){//拓展模块为公共头+底
|
|
617
|
return $this->success($type);
|
576
|
return $this->success($type);
|
|
618
|
}
|
577
|
}
|
|
619
|
//查看页面是否设置自定义头部底部
|
578
|
//查看页面是否设置自定义头部底部
|
|
620
|
- if($is_head != BTemplate::IS_NO_HEADER) {
|
|
|
|
621
|
$pageSettingModel = new PageSetting();
|
579
|
$pageSettingModel = new PageSetting();
|
|
622
|
- $pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id']]);
|
580
|
+ $pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id'],'type'=>$CommonType]);
|
|
623
|
if ($pageInfo === false) {
|
581
|
if ($pageInfo === false) {
|
|
624
|
return $this->success($type);
|
582
|
return $this->success($type);
|
|
625
|
}
|
583
|
}
|
|
626
|
- if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_PRODUCT_DETAIL;}}
|
|
|
|
627
|
- else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_PRODUCT_LIST;}}}
|
|
|
|
628
|
- if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_BLOG_DETAIL;}}
|
|
|
|
629
|
- else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_BLOG_LIST;}}}
|
|
|
|
630
|
- if ($source == BTemplate::SOURCE_NEWS) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_NEWS_DETAIL;}}
|
|
|
|
631
|
- else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_NEWS_LIST;}}}
|
|
|
|
632
|
- if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_CUSTOM_PAGE;}}
|
|
|
|
633
|
- }
|
584
|
+ if($source == BTemplate::SOURCE_HOME){if ($pageInfo['home'] != 0){$type = BTemplate::SOURCE_HOME;}}
|
|
|
|
585
|
+ if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}
|
|
|
|
586
|
+ else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}}
|
|
|
|
587
|
+ if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::SOURCE_BLOG;}}
|
|
|
|
588
|
+ else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::SOURCE_BLOG;}}}
|
|
|
|
589
|
+ if ($source == BTemplate::SOURCE_NEWS) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::SOURCE_NEWS;}}
|
|
|
|
590
|
+ else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::SOURCE_NEWS;}}}
|
|
|
|
591
|
+ if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::SOURCE_KEYWORD;}}
|
|
634
|
return $this->success($type);
|
592
|
return $this->success($type);
|
|
635
|
}
|
593
|
}
|
|
636
|
|
594
|
|
|
@@ -949,4 +907,37 @@ class BTemplateLogic extends BaseLogic |
|
@@ -949,4 +907,37 @@ class BTemplateLogic extends BaseLogic |
|
949
|
}
|
907
|
}
|
|
950
|
return $this->success();
|
908
|
return $this->success();
|
|
951
|
}
|
909
|
}
|
|
|
|
910
|
+
|
|
|
|
911
|
+ /**
|
|
|
|
912
|
+ * @remark :定制页面头部类型---根据source获取type类型
|
|
|
|
913
|
+ * @name :getType
|
|
|
|
914
|
+ * @author :lyh
|
|
|
|
915
|
+ * @method :post
|
|
|
|
916
|
+ * @time :2023/11/16 11:20
|
|
|
|
917
|
+ */
|
|
|
|
918
|
+ public function getCustomizedType($source,$is_list){
|
|
|
|
919
|
+ $type = BTemplate::TYPE_HOME;
|
|
|
|
920
|
+ if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
921
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
922
|
+ $type = BTemplate::TYPE_PRODUCT_LIST;
|
|
|
|
923
|
+ }else{
|
|
|
|
924
|
+ $type = BTemplate::TYPE_PRODUCT_DETAIL;
|
|
|
|
925
|
+ }
|
|
|
|
926
|
+ }
|
|
|
|
927
|
+ if($source == BTemplate::SOURCE_BLOG){
|
|
|
|
928
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
929
|
+ $type = BTemplate::TYPE_BLOG_LIST;
|
|
|
|
930
|
+ }else{
|
|
|
|
931
|
+ $type = BTemplate::TYPE_BLOG_DETAIL;
|
|
|
|
932
|
+ }
|
|
|
|
933
|
+ }
|
|
|
|
934
|
+ if($source == BTemplate::SOURCE_NEWS){
|
|
|
|
935
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
936
|
+ $type = BTemplate::TYPE_NEWS_LIST;
|
|
|
|
937
|
+ }else{
|
|
|
|
938
|
+ $type = BTemplate::TYPE_NEWS_DETAIL;
|
|
|
|
939
|
+ }
|
|
|
|
940
|
+ }
|
|
|
|
941
|
+ return $type;
|
|
|
|
942
|
+ }
|
|
952
|
} |
943
|
} |