作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2967
@@ -22,6 +22,7 @@ use App\Models\Com\UpdateLog; @@ -22,6 +22,7 @@ use App\Models\Com\UpdateLog;
22 use App\Models\Devops\Servers; 22 use App\Models\Devops\Servers;
23 use App\Models\Devops\ServersIp; 23 use App\Models\Devops\ServersIp;
24 use App\Models\Domain\DomainInfo; 24 use App\Models\Domain\DomainInfo;
  25 +use App\Models\Domain\DomainInfo as DomainInfoModel;
25 use App\Models\Industry\ProjectIndustryRelated; 26 use App\Models\Industry\ProjectIndustryRelated;
26 use App\Models\Inquiry\InquiryIP; 27 use App\Models\Inquiry\InquiryIP;
27 use App\Models\Inquiry\InquirySet; 28 use App\Models\Inquiry\InquirySet;
@@ -794,6 +795,17 @@ class ProjectLogic extends BaseLogic @@ -794,6 +795,17 @@ class ProjectLogic extends BaseLogic
794 if(($info['type'] == Project::TYPE_ZERO) && ($info['type'] != Project::TYPE_FIVE)){ 795 if(($info['type'] == Project::TYPE_ZERO) && ($info['type'] != Project::TYPE_FIVE)){
795 $param['type'] = Project::TYPE_ONE; 796 $param['type'] = Project::TYPE_ONE;
796 } 797 }
  798 + if($param['type'] == Project::TYPE_CLOSE){
  799 + $param['site_status'] = 1;//关闭站点
  800 + $domainModel = new DomainInfoModel();
  801 + $domainInfo = $domainModel->read(['project_id'=>$this->param['id']],['id','domain','amp_status']);
  802 + if($domainInfo){
  803 + $re = curl_get('https://'.$domainInfo['domain'].'/api/stop_or_start_website');
  804 + if(isset($re['status']) && $re['status'] !== 200){
  805 + $this->fail($re['message']);
  806 + }
  807 + }
  808 + }
797 //创建默认数据库 809 //创建默认数据库
798 if($param['type'] == Project::TYPE_ONE){ 810 if($param['type'] == Project::TYPE_ONE){
799 //改为异步 811 //改为异步