作者 lyh
... ... @@ -83,7 +83,21 @@ class UpdateController extends BaseController
$this->fail('非升级无法进行采集操作');
}
//产品分类开启了可视化之后,不能重新采集
$test_domain = $this->param['test_domain'] ?? '';
if ($test_domain) {
$test_domain_arr = parse_url($test_domain);
$test_domain = $test_domain_arr['host'] ?? '';
}
//查看项目是否已上线
$domain_info = DomainInfo::where('project_id', $this->param['project_id'])->first();
if ($domain_info && !$test_domain) {
$this->fail('已上线项目需填写采集的测试站域名');
}
if ($this->param['type'] == 1) {
//产品分类重采之前,判断产品分类是否开启了可视化
$category_list = Category::where('project_id', $this->param['project_id'])->get();
if ($category_list->count() > 0) {
$bSettingModel = new Setting();
... ... @@ -97,18 +111,6 @@ class UpdateController extends BaseController
}
}
}
$test_domain = $this->param['test_domain'] ?? '';
if ($test_domain) {
$test_domain_arr = parse_url($test_domain);
$test_domain = $test_domain_arr['host'] ?? '';
}
//查看项目是否已上线
$domain_info = DomainInfo::where('project_id', $this->param['project_id'])->first();
if ($domain_info && !$test_domain) {
$this->fail('已上线项目需填写采集的测试站域名');
}
try {
... ... @@ -199,7 +201,7 @@ class UpdateController extends BaseController
$this->response('采集任务添加成功');
}
public function getRenovation($project_id,$source, $is_list, $template_id, $id, $is_custom = 0)
public function getRenovation($project_id, $source, $is_list, $template_id, $id, $is_custom = 0)
{
$webTemplateModel = new BTemplate();
$param = [
... ...