|
...
|
...
|
@@ -81,7 +81,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$html = $this->isCustomizedPage($source,$source_id);//查看当前页面是否定制
|
|
|
|
return $this->success(['html'=>$html,'template_id'=>$template_id]);
|
|
|
|
}
|
|
|
|
$mainInfo = $this->getCommonMain($source,$source_id);//获取中间部分代码
|
|
|
|
$mainInfo = $this->getCommonMain($source,$source_id,$is_custom);//获取中间部分代码
|
|
|
|
}else{
|
|
|
|
$mainInfo = ['main_html'=>$templateInfo['main_html'], 'main_css'=>$templateInfo['main_css']];
|
|
|
|
}
|
|
...
|
...
|
@@ -210,12 +210,16 @@ class BTemplateLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2023/10/24 15:58
|
|
|
|
*/
|
|
|
|
public function getCommonMain($source,$source_id){
|
|
|
|
public function getCommonMain($source,$source_id,$is_custom){
|
|
|
|
$data = [];
|
|
|
|
if($is_custom == BTemplate::SOURCE_CUSTOM){
|
|
|
|
if($source_id != 0){$type = BTemplate::TYPE_SIX;}else{$type = BTemplate::TYPE_SEVEN;}
|
|
|
|
}else{
|
|
|
|
if ($source == BTemplate::SOURCE_PRODUCT) {if ($source_id != 0) {$type = BTemplate::TYPE_TWO;} else {$type = BTemplate::TYPE_THREE;}}
|
|
|
|
if ($source == BTemplate::SOURCE_BLOG) {if ($source_id != 0) {$type = BTemplate::TYPE_FOUR;} else {$type = BTemplate::TYPE_FIVE;}}
|
|
|
|
if ($source == BTemplate::SOURCE_NEWS) {if ($source_id != 0) {$type = BTemplate::TYPE_SIX;} else {$type = BTemplate::TYPE_SEVEN;}}
|
|
|
|
if ($source == BTemplate::SOURCE_KEYWORD) {$type = BTemplate::TYPE_EIGHT;}
|
|
|
|
}
|
|
|
|
//查询有没有公共详情模板
|
|
|
|
$bTemplateMainModel = new BTemplateMain();
|
|
|
|
$mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$type]);
|
...
|
...
|
|