|
...
|
...
|
@@ -21,6 +21,7 @@ use App\Models\Com\City; |
|
|
|
use App\Models\Com\UpdateLog;
|
|
|
|
use App\Models\Devops\ServerConfig;
|
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Domain\DomainInfo as DomainInfoModel;
|
|
|
|
use App\Models\HomeCount\Count;
|
|
|
|
use App\Models\Inquiry\InquirySet;
|
|
|
|
use App\Models\Manage\BelongingGroup;
|
|
...
|
...
|
@@ -1072,8 +1073,14 @@ class ProjectController extends BaseController |
|
|
|
'project_id.required' => '项目id不能为空',
|
|
|
|
'site_status.required' => '状态不能为空',
|
|
|
|
]);
|
|
|
|
$projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['id']]);
|
|
|
|
$projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['project_id']]);
|
|
|
|
//TODO::通知C端
|
|
|
|
$domainModel = new DomainInfoModel();
|
|
|
|
$domainInfo = $domainModel->read(['project_id'=>$this->param['project_id']]);
|
|
|
|
if($domainInfo !== false){
|
|
|
|
$rs = curl_get('https://'.$domainInfo['domain'].'/api/stop_or_start_website/');
|
|
|
|
@file_put_contents(storage_path('logs/site_status.log'), var_export('通知C端on/off'.$domainInfo['domain'].'.返回结果:'.json_encode($rs), true) . PHP_EOL, FILE_APPEND);
|
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|