正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
| @@ -57,7 +57,6 @@ class CustomTemplateLogic extends BaseLogic | @@ -57,7 +57,6 @@ class CustomTemplateLogic extends BaseLogic | ||
| 57 | * @time :2023/6/29 16:21 | 57 | * @time :2023/6/29 16:21 |
| 58 | */ | 58 | */ |
| 59 | public function customTemplateSave(){ | 59 | public function customTemplateSave(){ |
| 60 | - $this->param['url'] = str_replace_url($this->param['url']); | ||
| 61 | try { | 60 | try { |
| 62 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 61 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 63 | if(isset($this->param['html']) && !empty($this->param['html'])){ | 62 | if(isset($this->param['html']) && !empty($this->param['html'])){ |
| @@ -66,8 +65,11 @@ class CustomTemplateLogic extends BaseLogic | @@ -66,8 +65,11 @@ class CustomTemplateLogic extends BaseLogic | ||
| 66 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); | 65 | $this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'); |
| 67 | } | 66 | } |
| 68 | //查看路由是否更新 | 67 | //查看路由是否更新 |
| 69 | - $id = $this->editCustomRoute($this->param['id'],$this->param['url']); | ||
| 70 | - $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); | 68 | + if(isset($this->param['url']) && !empty($this->param['url'])){ |
| 69 | + $this->param['url'] = str_replace_url($this->param['url']); | ||
| 70 | + $id = $this->editCustomRoute($this->param['id'],$this->param['url']); | ||
| 71 | + $route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']); | ||
| 72 | + } | ||
| 71 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 73 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 72 | }else{ | 74 | }else{ |
| 73 | $this->param['project_id'] = $this->user['project_id']; | 75 | $this->param['project_id'] = $this->user['project_id']; |
-
请 注册 或 登录 后发表评论