|
@@ -78,23 +78,22 @@ class BTemplateLogic extends BaseLogic |
|
@@ -78,23 +78,22 @@ class BTemplateLogic extends BaseLogic |
|
78
|
$templateInfo = $this->webTemplateInfo($settingInfo['template_id'],$source,$source_id,$is_custom);
|
78
|
$templateInfo = $this->webTemplateInfo($settingInfo['template_id'],$source,$source_id,$is_custom);
|
|
79
|
if($templateInfo === false){
|
79
|
if($templateInfo === false){
|
|
80
|
if($this->user['is_customized'] == BTemplate::SOURCE_VISUALIZATION){//处理定制页面初始数据
|
80
|
if($this->user['is_customized'] == BTemplate::SOURCE_VISUALIZATION){//处理定制页面初始数据
|
|
81
|
- $resultCode = $this->isCustomizedPage($source,$source_id);//查看当前页面是否定制
|
|
|
|
82
|
- if($resultCode !== true){
|
|
|
|
83
|
- return ['html'=>$resultCode['html'],'template_id'=>$resultCode['template_id']];
|
81
|
+ $result = $this->isCustomizedPage($source,$source_id);//查看当前页面是否定制
|
|
|
|
82
|
+ if($result !== true){
|
|
|
|
83
|
+ return ['html'=>$result['html'],'template_id'=>$result['template_id']];
|
|
84
|
}
|
84
|
}
|
|
85
|
}
|
85
|
}
|
|
86
|
$mainInfo = $this->getCommonMain($source,$source_id);//获取中间部分代码
|
86
|
$mainInfo = $this->getCommonMain($source,$source_id);//获取中间部分代码
|
|
87
|
}else{
|
87
|
}else{
|
|
88
|
- $mainInfo = [
|
|
|
|
89
|
- 'main_html'=>$templateInfo['main_html'],
|
|
|
|
90
|
- 'main_css'=>$templateInfo['main_css'],
|
|
|
|
91
|
- ];
|
88
|
+ $mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
|
|
92
|
}
|
89
|
}
|
|
93
|
- $commonInfo = $this->getCommonPage($source,$source_id,$settingInfo['template_id']);//获取头部
|
|
|
|
94
|
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
|
90
|
if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
|
|
|
|
91
|
+ $type = $this->getCustomizedType($source, $source_id);//定制获取头部底部类型
|
|
|
|
92
|
+ $commonInfo = $this->getCommonPage(['template_id'=>0,'project_id'=>$this->user['project_id'],'type'=>$type]);//获取定制头部
|
|
95
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
93
|
$html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
|
|
96
|
return ['html'=>$html,'template_id'=>$settingInfo['template_id']];
|
94
|
return ['html'=>$html,'template_id'=>$settingInfo['template_id']];
|
|
97
|
}
|
95
|
}
|
|
|
|
96
|
+ $commonInfo = $this->getCommonPage($source,$source_id,$settingInfo['template_id']);//获取头部
|
|
98
|
$html = $commonInfo['head_css'].$mainInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
|
97
|
$html = $commonInfo['head_css'].$mainInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
|
|
99
|
$commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
|
98
|
$commonInfo['head_html'].$mainInfo['main_html'].$commonInfo['footer_html'];
|
|
100
|
$html = $this->getHeadFooter($html);
|
99
|
$html = $this->getHeadFooter($html);
|
|
@@ -117,7 +116,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -117,7 +116,7 @@ class BTemplateLogic extends BaseLogic |
|
117
|
}
|
116
|
}
|
|
118
|
|
117
|
|
|
119
|
/**
|
118
|
/**
|
|
120
|
- * @remark :页面是否为定制页面
|
119
|
+ * @remark :页面是否为定制页面获取初始代码
|
|
121
|
* @name :watchProjectIsCustomized
|
120
|
* @name :watchProjectIsCustomized
|
|
122
|
* @author :lyh
|
121
|
* @author :lyh
|
|
123
|
* @method :post
|
122
|
* @method :post
|