正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -47,8 +47,6 @@ class InitHtmlLogic extends BaseLogic | @@ -47,8 +47,6 @@ class InitHtmlLogic extends BaseLogic | ||
| 47 | $main_style = $mainInfo['main_css']; | 47 | $main_style = $mainInfo['main_css']; |
| 48 | } | 48 | } |
| 49 | $commonInfo = $this->getTypeCommonHtml($template_id,$this->param['type'],$is_custom,$is_list); //获取头部 | 49 | $commonInfo = $this->getTypeCommonHtml($template_id,$this->param['type'],$is_custom,$is_list); //获取头部 |
| 50 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($template_id, true) . PHP_EOL, FILE_APPEND); | ||
| 51 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($commonInfo, true) . PHP_EOL, FILE_APPEND); | ||
| 52 | $html = $commonInfo['head_css'].$main_style.$commonInfo['footer_css'].$commonInfo['other'].$commonInfo['head_html'].$main_html.$commonInfo['footer_html']; | 50 | $html = $commonInfo['head_css'].$main_style.$commonInfo['footer_css'].$commonInfo['other'].$commonInfo['head_html'].$main_html.$commonInfo['footer_html']; |
| 53 | $html = $this->getHeadFooter($html);//组装数据 | 51 | $html = $this->getHeadFooter($html);//组装数据 |
| 54 | return $this->success($html); | 52 | return $this->success($html); |
| @@ -200,10 +198,12 @@ class InitHtmlLogic extends BaseLogic | @@ -200,10 +198,12 @@ class InitHtmlLogic extends BaseLogic | ||
| 200 | //有独立头部,获取独立头部 | 198 | //有独立头部,获取独立头部 |
| 201 | $commonType = $this->getHeaderType($type,$is_list); | 199 | $commonType = $this->getHeaderType($type,$is_list); |
| 202 | $commonInfo = $templateCommonModel->read(['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>$commonType]); | 200 | $commonInfo = $templateCommonModel->read(['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>$commonType]); |
| 203 | - }else{ | 201 | + if($commonInfo !== false){ |
| 202 | + return $this->success($commonInfo); | ||
| 203 | + } | ||
| 204 | + } | ||
| 204 | //首页头底 | 205 | //首页头底 |
| 205 | $commonInfo = $templateCommonModel->read(['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>BTemplate::SOURCE_HOME]); | 206 | $commonInfo = $templateCommonModel->read(['template_id'=>$template_id,'project_id'=>$this->user['project_id'],'type'=>BTemplate::SOURCE_HOME]); |
| 206 | - } | ||
| 207 | return $this->success($commonInfo); | 207 | return $this->success($commonInfo); |
| 208 | } | 208 | } |
| 209 | 209 |
-
请 注册 或 登录 后发表评论