|
...
|
...
|
@@ -97,6 +97,12 @@ class BTemplateLogic extends BaseLogic |
|
|
|
//获取模板详情
|
|
|
|
$ATemplateModel = new Template();
|
|
|
|
$TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
|
|
|
|
}else{
|
|
|
|
//渲染首页数据
|
|
|
|
$ATemplateModel = new Template();
|
|
|
|
$ATemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
|
|
|
|
$TemplateInfo['name'] = $ATemplateInfo['name'];
|
|
|
|
$TemplateInfo['image_link'] = $this->getImageUrl($ATemplateInfo['image']);
|
|
|
|
}
|
|
|
|
$TemplateInfo['html'] = $this->getHeadFooter($TemplateInfo['html']);
|
|
|
|
return $this->success($TemplateInfo);
|
|
...
|
...
|
@@ -192,12 +198,6 @@ class BTemplateLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function templateSaveParam($template_id){
|
|
|
|
$this->param['project_id'] = $this->user['project_id'];
|
|
|
|
//获取模板详情
|
|
|
|
$ATemplateModel = new Template();
|
|
|
|
$TemplateInfo = $ATemplateModel->read(['id'=>$template_id]);
|
|
|
|
//同步数据
|
|
|
|
$this->param['name'] = $TemplateInfo['name'];
|
|
|
|
$this->param['image'] = $TemplateInfo['image'];
|
|
|
|
if($this->param['source'] == 1){//首页
|
|
|
|
$this->param['html'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/footer>/s');
|
|
|
|
}else{
|
|
...
|
...
|
@@ -313,9 +313,13 @@ class BTemplateLogic extends BaseLogic |
|
|
|
]
|
|
|
|
];
|
|
|
|
//产品,新闻,博客,一级分类数据
|
|
|
|
$productCategory = Category::where("pid",0)->get();
|
|
|
|
$newCategory = NewsCategory::where("pid",0)->get();
|
|
|
|
$blogCategory = BlogCategory::where("pid",0)->get();
|
|
|
|
$map = [
|
|
|
|
'pid'=>0,
|
|
|
|
'project_id'=>$this->user['project_id']
|
|
|
|
];
|
|
|
|
$productCategory = Category::where($map)->get();
|
|
|
|
$newCategory = NewsCategory::where($map)->get();
|
|
|
|
$blogCategory = BlogCategory::where($map)->get();
|
|
|
|
if (!empty($productCategory)){
|
|
|
|
foreach ($productCategory as $item){
|
|
|
|
$data["products"]["category"][] =$item;
|
...
|
...
|
|