|
...
|
...
|
@@ -109,6 +109,7 @@ class AdsController extends BaseController |
|
|
|
if(empty($target)){
|
|
|
|
return $this->response('请添加关联网站!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
$is_require_num = 0;
|
|
|
|
foreach ($target as &$item){
|
|
|
|
if(empty($item['url'])){
|
|
|
|
return $this->response('网站域名不能为空!', Code::USER_ERROR, []);
|
|
...
|
...
|
@@ -120,7 +121,14 @@ class AdsController extends BaseController |
|
|
|
return $this->response('代理商分组不能为空!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
$item['url'] = trim(str_replace(['http://', 'https://'], '', $item['url']), '/');
|
|
|
|
if(!empty($item['is_require'])){
|
|
|
|
$is_require_num++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($is_require_num > $task->num){
|
|
|
|
return $this->response('必选渠道不能大于转发数量!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($target as $v){
|
|
|
|
ReInquiryCount::addInquiryNum($id, $v['url'], 0);
|
|
|
|
}
|
...
|
...
|
|