|
@@ -64,14 +64,17 @@ class CustomTemplateLogic extends BaseLogic |
|
@@ -64,14 +64,17 @@ class CustomTemplateLogic extends BaseLogic |
|
64
|
$this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s');
|
64
|
$this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s');
|
|
65
|
$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');
|
|
66
|
}
|
66
|
}
|
|
|
|
67
|
+ $id = $this->param['id'];
|
|
67
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
68
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
68
|
}else{
|
69
|
}else{
|
|
69
|
$this->param['project_id'] = $this->user['project_id'];
|
70
|
$this->param['project_id'] = $this->user['project_id'];
|
|
70
|
- $rs = $this->model->add($this->param);
|
71
|
+ $id = $this->model->addReturnId($this->param);
|
|
71
|
}
|
72
|
}
|
|
72
|
if($rs === false){
|
73
|
if($rs === false){
|
|
73
|
$this->fail('error');
|
74
|
$this->fail('error');
|
|
74
|
}
|
75
|
}
|
|
|
|
76
|
+ //路由映射
|
|
|
|
77
|
+ RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']);
|
|
75
|
//TODO::通知网站更新
|
78
|
//TODO::通知网站更新
|
|
76
|
$data = [
|
79
|
$data = [
|
|
77
|
'project_id'=>$this->user['project_id'],
|
80
|
'project_id'=>$this->user['project_id'],
|