作者 lyh

gx

@@ -62,8 +62,6 @@ class BTemplateLogic extends BaseLogic @@ -62,8 +62,6 @@ class BTemplateLogic extends BaseLogic
62 $TemplateInfo = $this->productHtml($info,$this->param['source'],$this->param['source_id']); 62 $TemplateInfo = $this->productHtml($info,$this->param['source'],$this->param['source_id']);
63 } 63 }
64 } 64 }
65 - var_dump($TemplateInfo);  
66 - die();  
67 return $this->success($TemplateInfo); 65 return $this->success($TemplateInfo);
68 } 66 }
69 67
@@ -99,6 +97,12 @@ class BTemplateLogic extends BaseLogic @@ -99,6 +97,12 @@ class BTemplateLogic extends BaseLogic
99 //获取模板详情 97 //获取模板详情
100 $ATemplateModel = new Template(); 98 $ATemplateModel = new Template();
101 $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]); 99 $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
  100 + }else{
  101 + //渲染首页数据
  102 + $ATemplateModel = new Template();
  103 + $ATemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
  104 + $TemplateInfo['name'] = $ATemplateInfo['name'];
  105 + $TemplateInfo['image'] = $this->getImageUrl($ATemplateInfo['image']);
102 } 106 }
103 $TemplateInfo['html'] = $this->getHeadFooter($TemplateInfo['html']); 107 $TemplateInfo['html'] = $this->getHeadFooter($TemplateInfo['html']);
104 return $this->success($TemplateInfo); 108 return $this->success($TemplateInfo);
@@ -194,12 +198,6 @@ class BTemplateLogic extends BaseLogic @@ -194,12 +198,6 @@ class BTemplateLogic extends BaseLogic
194 */ 198 */
195 public function templateSaveParam($template_id){ 199 public function templateSaveParam($template_id){
196 $this->param['project_id'] = $this->user['project_id']; 200 $this->param['project_id'] = $this->user['project_id'];
197 - //获取模板详情  
198 - $ATemplateModel = new Template();  
199 - $TemplateInfo = $ATemplateModel->read(['id'=>$template_id]);  
200 - //同步数据  
201 - $this->param['name'] = $TemplateInfo['name'];  
202 - $this->param['image'] = $TemplateInfo['image'];  
203 if($this->param['source'] == 1){//首页 201 if($this->param['source'] == 1){//首页
204 $this->param['html'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/footer>/s'); 202 $this->param['html'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/footer>/s');
205 }else{ 203 }else{