正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -198,13 +198,13 @@ class BTemplateLogic extends BaseLogic | @@ -198,13 +198,13 @@ class BTemplateLogic extends BaseLogic | ||
| 198 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); | 198 | $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); |
| 199 | //字符串截取 | 199 | //字符串截取 |
| 200 | $this->param = $this->stringProcessing($this->param); | 200 | $this->param = $this->stringProcessing($this->param); |
| 201 | + $this->saveCommonTemplate($this->param); | ||
| 201 | $this->param = $this->templateSaveParam($this->param);//组装数据 | 202 | $this->param = $this->templateSaveParam($this->param);//组装数据 |
| 202 | if($info === false){ | 203 | if($info === false){ |
| 203 | $this->model->add($this->param); | 204 | $this->model->add($this->param); |
| 204 | }else{ | 205 | }else{ |
| 205 | $this->model->edit($this->param,['id'=>$info['id']]); | 206 | $this->model->edit($this->param,['id'=>$info['id']]); |
| 206 | } | 207 | } |
| 207 | - $this->saveCommonTemplate($this->param); | ||
| 208 | $this->setTemplateLog($this->param); | 208 | $this->setTemplateLog($this->param); |
| 209 | DB::commit(); | 209 | DB::commit(); |
| 210 | }catch (\Exception $e){ | 210 | }catch (\Exception $e){ |
| @@ -300,6 +300,11 @@ class BTemplateLogic extends BaseLogic | @@ -300,6 +300,11 @@ class BTemplateLogic extends BaseLogic | ||
| 300 | */ | 300 | */ |
| 301 | public function templateSaveParam($param){ | 301 | public function templateSaveParam($param){ |
| 302 | $param['project_id'] = $this->user['project_id']; | 302 | $param['project_id'] = $this->user['project_id']; |
| 303 | + if($param['source'] == 1){//首页 | ||
| 304 | + $param['html'] = characterTruncation($param['html'],'/<style id="globalsojs-header">(.*?)<\/footer>/s'); | ||
| 305 | + }else{ | ||
| 306 | + $param['html'] = $param['main_html']; | ||
| 307 | + } | ||
| 303 | return $this->success($param); | 308 | return $this->success($param); |
| 304 | } | 309 | } |
| 305 | 310 |
-
请 注册 或 登录 后发表评论