|
...
|
...
|
@@ -153,6 +153,8 @@ class ProjectLogic extends BaseLogic |
|
|
|
}else{
|
|
|
|
//初始化项目
|
|
|
|
$this->createProjectData($this->param);
|
|
|
|
//双向绑定服务器,需放到保存项目的上方
|
|
|
|
$this->setServers($this->param['serve_id'],$this->param['id']);
|
|
|
|
//保存项目信息
|
|
|
|
$this->saveProject($this->param);
|
|
|
|
//保存建站部署信息
|
|
...
|
...
|
@@ -169,8 +171,6 @@ class ProjectLogic extends BaseLogic |
|
|
|
$this->syncImageFile($this->param['project_location'],$this->param['id']);
|
|
|
|
//同步信息表
|
|
|
|
(new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
//双向绑定服务器
|
|
|
|
$this->setServers($this->param['serve_id'],$this->param['id']);
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
...
|
...
|
@@ -210,8 +210,6 @@ class ProjectLogic extends BaseLogic |
|
|
|
if(count($project_arr) >= $serversInfo['ip_total']){
|
|
|
|
$this->fail('请选择其他服务器,当前ip已满');
|
|
|
|
}
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($project_arr, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($project_id, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
if(!in_array($project_id,$project_arr) || empty($project_arr)){
|
|
|
|
array_push($project_arr,$project_id);
|
|
|
|
$project_str = ','.implode(',',$project_arr).',';
|
...
|
...
|
|