|
...
|
...
|
@@ -9,9 +9,11 @@ namespace App\Http\Controllers\Aside\Task; |
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Helper\QuanqiusouApi;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Models\Channel\Channel;
|
|
|
|
use App\Models\Domain\DomainInfo;
|
|
|
|
use App\Models\Inquiry\ReInquiryCount;
|
|
|
|
use App\Models\Inquiry\ReInquiryDetail;
|
|
|
|
use App\Models\Inquiry\ReInquiryForm;
|
|
|
|
use App\Models\Inquiry\ReInquiryTask;
|
|
...
|
...
|
@@ -117,6 +119,9 @@ class AdsController extends BaseController |
|
|
|
}
|
|
|
|
$item['url'] = trim(str_replace(['http://', 'https://'], '', $item['url']), '/');
|
|
|
|
}
|
|
|
|
foreach ($target as $v){
|
|
|
|
ReInquiryCount::addInquiryNum($id, $v['url'], 0);
|
|
|
|
}
|
|
|
|
$task->target = json_encode($target);
|
|
|
|
$task->save();
|
|
|
|
return $this->response('success', Code::SUCCESS, []);
|
|
...
|
...
|
@@ -141,19 +146,9 @@ class AdsController extends BaseController |
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
|
|
}
|
|
|
|
|
|
|
|
$token = md5($domain.'qqs');
|
|
|
|
try {
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
|
|
$res = $client->request('GET', 'https://quanqiusou.cn/extend_api/api/get_agent_by_domain.php?'.http_build_query(['token' => $token, 'domain' => $domain]), [
|
|
|
|
'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
|
|
|
|
])->getBody()->getContents();
|
|
|
|
$res = Arr::s2a($res);
|
|
|
|
} catch (\Exception | GuzzleException $e) {
|
|
|
|
return $this->response('验证失败,请稍后再试!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
$res = (new QuanqiusouApi())->getV5Agent($domain);
|
|
|
|
if(empty($res['status']) || $res['status'] != 200){
|
|
|
|
return $this->response($res['msg'], Code::USER_ERROR, []);
|
|
|
|
return $this->response($res['msg'] ?? '验证失败,请稍后再试!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
|
|
|
|
$agent = implode(',', array_map(function ($v){
|
...
|
...
|
|