正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -1126,16 +1126,16 @@ class ProjectController extends BaseController | @@ -1126,16 +1126,16 @@ class ProjectController extends BaseController | ||
| 1126 | public function saveSiteStatus(){ | 1126 | public function saveSiteStatus(){ |
| 1127 | $projectModel = new Project(); | 1127 | $projectModel = new Project(); |
| 1128 | $this->request->validate([ | 1128 | $this->request->validate([ |
| 1129 | - 'project_id'=>'required', | 1129 | + 'id'=>'required', |
| 1130 | 'site_status'=>'required' | 1130 | 'site_status'=>'required' |
| 1131 | ],[ | 1131 | ],[ |
| 1132 | - 'project_id.required' => '项目id不能为空', | 1132 | + 'id.required' => '项目id不能为空', |
| 1133 | 'site_status.required' => '状态不能为空', | 1133 | 'site_status.required' => '状态不能为空', |
| 1134 | ]); | 1134 | ]); |
| 1135 | - $projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['project_id']]); | 1135 | + $projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['id']]); |
| 1136 | //TODO::通知C端 | 1136 | //TODO::通知C端 |
| 1137 | $domainModel = new DomainInfoModel(); | 1137 | $domainModel = new DomainInfoModel(); |
| 1138 | - $domainInfo = $domainModel->read(['project_id'=>$this->param['project_id']]); | 1138 | + $domainInfo = $domainModel->read(['project_id'=>$this->param['id']]); |
| 1139 | if($domainInfo !== false){ | 1139 | if($domainInfo !== false){ |
| 1140 | $rs = curl_get('https://'.$domainInfo['domain'].'/api/stop_or_start_website/'); | 1140 | $rs = curl_get('https://'.$domainInfo['domain'].'/api/stop_or_start_website/'); |
| 1141 | @file_put_contents(storage_path('logs/site_status.log'), var_export('通知C端on/off'.$domainInfo['domain'].'.返回结果:'.json_encode($rs), true) . PHP_EOL, FILE_APPEND); | 1141 | @file_put_contents(storage_path('logs/site_status.log'), var_export('通知C端on/off'.$domainInfo['domain'].'.返回结果:'.json_encode($rs), true) . PHP_EOL, FILE_APPEND); |
-
请 注册 或 登录 后发表评论