|
...
|
...
|
@@ -63,7 +63,6 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
* @time :2023/6/29 16:21
|
|
|
|
*/
|
|
|
|
public function customTemplateSave(){
|
|
|
|
try {
|
|
|
|
$this->param['url'] = str_replace_url($this->param['url']);
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$this->param['url'] = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $this->param['id'], $this->user['project_id']);
|
|
...
|
...
|
@@ -79,9 +78,6 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route);
|
|
|
|
$this->model->edit(['url'=>$route],['id'=>$id]);
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -208,13 +204,13 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function editCustomRoute($route){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
if($info['url'] == $this->model::NOT_FOUND_PAGE_URL && $route['url'] != '404'){
|
|
|
|
if($info['url'] == $this->model::NOT_FOUND_PAGE_URL){
|
|
|
|
if($route != '404'){
|
|
|
|
$this->fail('404页面链接不可修改');
|
|
|
|
}
|
|
|
|
if($info['url'] != $route){
|
|
|
|
}
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_PAGE,$route);
|
|
|
|
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$route]);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|