Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
1 个修改的文件
包含
19 行增加
和
4 行删除
| @@ -66,6 +66,7 @@ class BTemplateLogic extends BaseLogic | @@ -66,6 +66,7 @@ class BTemplateLogic extends BaseLogic | ||
| 66 | //获取模板详情 | 66 | //获取模板详情 |
| 67 | $ATemplateModel = new Template(); | 67 | $ATemplateModel = new Template(); |
| 68 | $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]); | 68 | $TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]); |
| 69 | + $TemplateInfo['html'] = $this->getHeadFooter($TemplateInfo['html']); | ||
| 69 | } | 70 | } |
| 70 | } | 71 | } |
| 71 | return $this->success($TemplateInfo); | 72 | return $this->success($TemplateInfo); |
| @@ -143,19 +144,31 @@ class BTemplateLogic extends BaseLogic | @@ -143,19 +144,31 @@ class BTemplateLogic extends BaseLogic | ||
| 143 | //同步数据 | 144 | //同步数据 |
| 144 | $this->param['name'] = $TemplateInfo['name']; | 145 | $this->param['name'] = $TemplateInfo['name']; |
| 145 | $this->param['image'] = $TemplateInfo['image']; | 146 | $this->param['image'] = $TemplateInfo['image']; |
| 147 | + $this->getHeadFooter(characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/footer>/s')); | ||
| 148 | + return true; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * @remark :拼接获取公共头部底部 | ||
| 153 | + * @name :getHeadFooter | ||
| 154 | + * @author :lyh | ||
| 155 | + * @method :post | ||
| 156 | + * @time :2023/7/21 17:22 | ||
| 157 | + */ | ||
| 158 | + public function getHeadFooter($html){ | ||
| 146 | //获取公共主题头部底部 | 159 | //获取公共主题头部底部 |
| 147 | $serviceSettingModel = new ServiceSettingModel(); | 160 | $serviceSettingModel = new ServiceSettingModel(); |
| 148 | $list = $serviceSettingModel->list(['type'=>2],'created_at'); | 161 | $list = $serviceSettingModel->list(['type'=>2],'created_at'); |
| 149 | //拼接html | 162 | //拼接html |
| 150 | - foreach ($list as $k => $v){ | 163 | + foreach ($list as $v){ |
| 151 | if($v['key'] == 'head'){ | 164 | if($v['key'] == 'head'){ |
| 152 | - $this->param['html'] = $v['values'].$this->param['html']; | 165 | + $html = $v['values'].$html; |
| 153 | } | 166 | } |
| 154 | if($v['key'] == 'footer'){ | 167 | if($v['key'] == 'footer'){ |
| 155 | - $this->param['html'] = $this->param['html'].$v['values']; | 168 | + $html = $html.$v['values']; |
| 156 | } | 169 | } |
| 157 | } | 170 | } |
| 158 | - return true; | 171 | + return $html; |
| 159 | } | 172 | } |
| 160 | 173 | ||
| 161 | /** | 174 | /** |
| @@ -173,6 +186,8 @@ class BTemplateLogic extends BaseLogic | @@ -173,6 +186,8 @@ class BTemplateLogic extends BaseLogic | ||
| 173 | $this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s'); | 186 | $this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s'); |
| 174 | } | 187 | } |
| 175 | 188 | ||
| 189 | + | ||
| 190 | + | ||
| 176 | /** | 191 | /** |
| 177 | * @remark :获取类型 | 192 | * @remark :获取类型 |
| 178 | * @name :getModuleType | 193 | * @name :getModuleType |
-
请 注册 或 登录 后发表评论