作者 lyh

gx

@@ -104,16 +104,14 @@ class BTemplateLogic extends BaseLogic @@ -104,16 +104,14 @@ class BTemplateLogic extends BaseLogic
104 $ATemplateModel = new Template(); 104 $ATemplateModel = new Template();
105 $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]); 105 $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
106 }else{ 106 }else{
107 - //兼容老数据  
108 $commonTemplateModel = new BTemplateCommon(); 107 $commonTemplateModel = new BTemplateCommon();
109 $commonInfo = $commonTemplateModel->read(['template_id'=>$info['template_id'],'project_id'=>$this->user['project_id']]); 108 $commonInfo = $commonTemplateModel->read(['template_id'=>$info['template_id'],'project_id'=>$this->user['project_id']]);
110 if($commonInfo !== false){ 109 if($commonInfo !== false){
111 $TemplateInfo['html'] = $commonInfo['head_css'].$TemplateInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other']. 110 $TemplateInfo['html'] = $commonInfo['head_css'].$TemplateInfo['main_css'].$commonInfo['footer_css'].$commonInfo['other'].
112 $commonInfo['head_html'].$TemplateInfo['main_html'].$commonInfo['footer_html']; 111 $commonInfo['head_html'].$TemplateInfo['main_html'].$commonInfo['footer_html'];
113 } 112 }
114 - //渲染首页数据  
115 $ATemplateModel = new Template(); 113 $ATemplateModel = new Template();
116 - $ATemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]); 114 + $ATemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']],['name','image']);
117 $TemplateInfo['name'] = $ATemplateInfo['name']; 115 $TemplateInfo['name'] = $ATemplateInfo['name'];
118 $TemplateInfo['image_link'] = getImageUrl($ATemplateInfo['image']); 116 $TemplateInfo['image_link'] = getImageUrl($ATemplateInfo['image']);
119 } 117 }