|
...
|
...
|
@@ -1136,7 +1136,7 @@ class ProjectController extends BaseController |
|
|
|
|
|
|
|
//获取项目数据
|
|
|
|
$projectModel = new Project();
|
|
|
|
$projectInfo = $projectModel->read(['id'=>$this->param['id']],['project_type','serve_id','site_status']);
|
|
|
|
$projectInfo = $projectModel->read(['id'=>$this->param['id']],['project_type','serve_id','site_status','site_token']);
|
|
|
|
if(!$projectInfo){
|
|
|
|
$this->fail('获取项目数据失败');
|
|
|
|
}
|
|
...
|
...
|
@@ -1144,6 +1144,19 @@ class ProjectController extends BaseController |
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
if($projectInfo['serve_id'] == 8){
|
|
|
|
//自建站项目
|
|
|
|
if($this->param['site_status'] == 1){
|
|
|
|
//关闭站点
|
|
|
|
$site_token = $projectInfo['site_token'] ? $projectInfo['site_token'].'_expired' : '';
|
|
|
|
}else{
|
|
|
|
//开启站点
|
|
|
|
$site_token = str_replace('_expired','',$projectInfo['site_token']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$projectModel->edit(['site_status'=>$this->param['site_status'],'site_token'=>$site_token],['id'=>$this->param['id']]);
|
|
|
|
}else{
|
|
|
|
//普通项目
|
|
|
|
//获取域名数据
|
|
|
|
$domainModel = new DomainInfoModel();
|
|
|
|
$domainInfo = $domainModel->read(['project_id'=>$this->param['id']],['id','domain','amp_status']);
|
|
...
|
...
|
@@ -1199,6 +1212,7 @@ class ProjectController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
$projectModel->edit(['site_status'=>$this->param['site_status']],['id'=>$this->param['id']]);
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->response('success');
|
|
|
|
}
|
...
|
...
|
|