正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -111,12 +111,12 @@ class CustomTemplateLogic extends BaseLogic | @@ -111,12 +111,12 @@ class CustomTemplateLogic extends BaseLogic | ||
| 111 | $this->saveCommonTemplate($html,$bSettingInfo['template_id']); | 111 | $this->saveCommonTemplate($html,$bSettingInfo['template_id']); |
| 112 | $this->param['html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'); | 112 | $this->param['html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'); |
| 113 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); | 113 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); |
| 114 | - $this->setTemplateLog($bSettingInfo['template_id'],$html,$this->param['id']); | ||
| 115 | } | 114 | } |
| 116 | $rs = $this->model->edit($this->param,['id'=>$this->param['id'],'project_id'=>$this->user['project_id']]); | 115 | $rs = $this->model->edit($this->param,['id'=>$this->param['id'],'project_id'=>$this->user['project_id']]); |
| 117 | if($rs === false){ | 116 | if($rs === false){ |
| 118 | $this->fail('系统错误,请联系管理'); | 117 | $this->fail('系统错误,请联系管理'); |
| 119 | } | 118 | } |
| 119 | + $this->setTemplateLog($info,$bSettingInfo['template_id'],$html,$this->param['id']); | ||
| 120 | //通知 | 120 | //通知 |
| 121 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']); | 121 | $this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']); |
| 122 | $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$info['url']]); | 122 | $this->curlDelRoute(['route'=>$info['url'],'new_route'=>$info['url']]); |
| @@ -391,8 +391,11 @@ class CustomTemplateLogic extends BaseLogic | @@ -391,8 +391,11 @@ class CustomTemplateLogic extends BaseLogic | ||
| 391 | ]; | 391 | ]; |
| 392 | $commonTemplateModel = new BTemplateCommon(); | 392 | $commonTemplateModel = new BTemplateCommon(); |
| 393 | $commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]); | 393 | $commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]); |
| 394 | + $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); | ||
| 395 | + }else{ | ||
| 396 | + $this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]); | ||
| 394 | } | 397 | } |
| 395 | - $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); | 398 | + |
| 396 | return $this->success(); | 399 | return $this->success(); |
| 397 | } | 400 | } |
| 398 | } | 401 | } |
-
请 注册 或 登录 后发表评论