正在显示
1 个修改的文件
包含
9 行增加
和
4 行删除
| @@ -71,9 +71,6 @@ class CustomTemplateLogic extends BaseLogic | @@ -71,9 +71,6 @@ class CustomTemplateLogic extends BaseLogic | ||
| 71 | }catch (\Exception $e){ | 71 | }catch (\Exception $e){ |
| 72 | $this->fail('error'); | 72 | $this->fail('error'); |
| 73 | } | 73 | } |
| 74 | - //TODO::通知网站更新 | ||
| 75 | - $data = ['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PAGE, 'route'=>$route]; | ||
| 76 | - $this->updateNotify($data); | ||
| 77 | return $this->success(); | 74 | return $this->success(); |
| 78 | } | 75 | } |
| 79 | 76 | ||
| @@ -88,7 +85,15 @@ class CustomTemplateLogic extends BaseLogic | @@ -88,7 +85,15 @@ class CustomTemplateLogic extends BaseLogic | ||
| 88 | $html = $this->param['html']; | 85 | $html = $this->param['html']; |
| 89 | $this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s'); | 86 | $this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s'); |
| 90 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); | 87 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); |
| 91 | - $this->model->edit($this->param,['id'=>$this->param['id']]); | 88 | + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 89 | + if($rs === false){ | ||
| 90 | + $this->fail('系统错误,请联系管理'); | ||
| 91 | + } | ||
| 92 | + //TODO::通知网站更新 | ||
| 93 | + $info = $this->model->read(['id'=>$this->param['id']],['id','url']); | ||
| 94 | + $data = ['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PAGE, 'route'=>$info['url']]; | ||
| 95 | + $this->updateNotify($data); | ||
| 96 | + return $this->success(); | ||
| 92 | } | 97 | } |
| 93 | 98 | ||
| 94 | /** | 99 | /** |
-
请 注册 或 登录 后发表评论