作者 lyh
@@ -83,7 +83,21 @@ class UpdateController extends BaseController @@ -83,7 +83,21 @@ class UpdateController extends BaseController
83 $this->fail('非升级无法进行采集操作'); 83 $this->fail('非升级无法进行采集操作');
84 } 84 }
85 85
86 - //产品分类开启了可视化之后,不能重新采集 86 + $test_domain = $this->param['test_domain'] ?? '';
  87 + if ($test_domain) {
  88 + $test_domain_arr = parse_url($test_domain);
  89 + $test_domain = $test_domain_arr['host'] ?? '';
  90 + }
  91 +
  92 + //查看项目是否已上线
  93 + $domain_info = DomainInfo::where('project_id', $this->param['project_id'])->first();
  94 +
  95 + if ($domain_info && !$test_domain) {
  96 + $this->fail('已上线项目需填写采集的测试站域名');
  97 + }
  98 +
  99 + if ($this->param['type'] == 1) {
  100 + //产品分类重采之前,判断产品分类是否开启了可视化
87 $category_list = Category::where('project_id', $this->param['project_id'])->get(); 101 $category_list = Category::where('project_id', $this->param['project_id'])->get();
88 if ($category_list->count() > 0) { 102 if ($category_list->count() > 0) {
89 $bSettingModel = new Setting(); 103 $bSettingModel = new Setting();
@@ -97,18 +111,6 @@ class UpdateController extends BaseController @@ -97,18 +111,6 @@ class UpdateController extends BaseController
97 } 111 }
98 } 112 }
99 } 113 }
100 -  
101 - $test_domain = $this->param['test_domain'] ?? '';  
102 - if ($test_domain) {  
103 - $test_domain_arr = parse_url($test_domain);  
104 - $test_domain = $test_domain_arr['host'] ?? '';  
105 - }  
106 -  
107 - //查看项目是否已上线  
108 - $domain_info = DomainInfo::where('project_id', $this->param['project_id'])->first();  
109 -  
110 - if ($domain_info && !$test_domain) {  
111 - $this->fail('已上线项目需填写采集的测试站域名');  
112 } 114 }
113 115
114 try { 116 try {
@@ -199,7 +201,7 @@ class UpdateController extends BaseController @@ -199,7 +201,7 @@ class UpdateController extends BaseController
199 $this->response('采集任务添加成功'); 201 $this->response('采集任务添加成功');
200 } 202 }
201 203
202 - public function getRenovation($project_id,$source, $is_list, $template_id, $id, $is_custom = 0) 204 + public function getRenovation($project_id, $source, $is_list, $template_id, $id, $is_custom = 0)
203 { 205 {
204 $webTemplateModel = new BTemplate(); 206 $webTemplateModel = new BTemplate();
205 $param = [ 207 $param = [