正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -153,6 +153,8 @@ class ProjectLogic extends BaseLogic | @@ -153,6 +153,8 @@ class ProjectLogic extends BaseLogic | ||
| 153 | }else{ | 153 | }else{ |
| 154 | //初始化项目 | 154 | //初始化项目 |
| 155 | $this->createProjectData($this->param); | 155 | $this->createProjectData($this->param); |
| 156 | + //双向绑定服务器,需放到保存项目的上方 | ||
| 157 | + $this->setServers($this->param['serve_id'],$this->param['id']); | ||
| 156 | //保存项目信息 | 158 | //保存项目信息 |
| 157 | $this->saveProject($this->param); | 159 | $this->saveProject($this->param); |
| 158 | //保存建站部署信息 | 160 | //保存建站部署信息 |
| @@ -169,8 +171,6 @@ class ProjectLogic extends BaseLogic | @@ -169,8 +171,6 @@ class ProjectLogic extends BaseLogic | ||
| 169 | $this->syncImageFile($this->param['project_location'],$this->param['id']); | 171 | $this->syncImageFile($this->param['project_location'],$this->param['id']); |
| 170 | //同步信息表 | 172 | //同步信息表 |
| 171 | (new SyncService())->projectAcceptAddress($this->param['id']); | 173 | (new SyncService())->projectAcceptAddress($this->param['id']); |
| 172 | - //双向绑定服务器 | ||
| 173 | - $this->setServers($this->param['serve_id'],$this->param['id']); | ||
| 174 | } | 174 | } |
| 175 | return $this->success(); | 175 | return $this->success(); |
| 176 | } | 176 | } |
| @@ -210,8 +210,6 @@ class ProjectLogic extends BaseLogic | @@ -210,8 +210,6 @@ class ProjectLogic extends BaseLogic | ||
| 210 | if(count($project_arr) >= $serversInfo['ip_total']){ | 210 | if(count($project_arr) >= $serversInfo['ip_total']){ |
| 211 | $this->fail('请选择其他服务器,当前ip已满'); | 211 | $this->fail('请选择其他服务器,当前ip已满'); |
| 212 | } | 212 | } |
| 213 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($project_arr, true) . PHP_EOL, FILE_APPEND); | ||
| 214 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($project_id, true) . PHP_EOL, FILE_APPEND); | ||
| 215 | if(!in_array($project_id,$project_arr) || empty($project_arr)){ | 213 | if(!in_array($project_id,$project_arr) || empty($project_arr)){ |
| 216 | array_push($project_arr,$project_id); | 214 | array_push($project_arr,$project_id); |
| 217 | $project_str = ','.implode(',',$project_arr).','; | 215 | $project_str = ','.implode(',',$project_arr).','; |
-
请 注册 或 登录 后发表评论