|
...
|
...
|
@@ -136,7 +136,7 @@ class AdsController extends BaseController |
|
|
|
$channel = Project::where('id', $domain_info['project_id'])->value('channel');
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 1,
|
|
|
|
'agent' => Channel::getChannelText($channel['user_id']??0),
|
|
|
|
'agent' => trim(explode(',', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
...
|
...
|
@@ -144,7 +144,10 @@ class AdsController extends BaseController |
|
|
|
|
|
|
|
$token = md5($domain.'qqs');
|
|
|
|
try {
|
|
|
|
$res = HttpUtils::get('https://quanqiusou.cn/extend_api/api/get_agent_by_domain.php', ['token' => $token, 'domain' => $domain]);
|
|
|
|
$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, []);
|
|
...
|
...
|
@@ -152,9 +155,14 @@ class AdsController extends BaseController |
|
|
|
if(empty($res['status']) || $res['status'] != 200){
|
|
|
|
return $this->response($res['msg'], Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
|
|
|
|
$agent = implode(',', array_map(function ($v){
|
|
|
|
return trim(explode('-', $v)[0]);
|
|
|
|
}, explode(',', $res['data'] ?? '')));
|
|
|
|
|
|
|
|
$data = [
|
|
|
|
'is_v6' => 0,
|
|
|
|
'agent' => $res['data'],
|
|
|
|
'agent' => $agent,
|
|
|
|
'domain' => $domain,
|
|
|
|
];
|
|
|
|
return $this->response('success', Code::SUCCESS, $data);
|
|
...
|
...
|
@@ -218,4 +226,28 @@ class AdsController extends BaseController |
|
|
|
->paginate();
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function fbRelayCount(Request $request){
|
|
|
|
$task_id = intval($request->input('task_id'));
|
|
|
|
$domain = trim($request->input('domain'));
|
|
|
|
$company = trim($request->input('company'));
|
|
|
|
$num = trim($request->input('num'));
|
|
|
|
|
|
|
|
$result = ReInquiryDetail::with('detailLog')
|
|
|
|
->when($status, function ($query, $status) {
|
|
|
|
return $query->where('status', $status);
|
|
|
|
})
|
|
|
|
->when($form_id, function ($query, $form_id) {
|
|
|
|
return $query->where('form_id', $form_id);
|
|
|
|
})
|
|
|
|
->when($task_id, function ($query, $task_id) {
|
|
|
|
return $query->where('task_id', $task_id);
|
|
|
|
})
|
|
|
|
->when($country, function ($query, $country) {
|
|
|
|
return $query->where('country', 'like', '%'.$country.'%');
|
|
|
|
})
|
|
|
|
->orderBy('id', 'desc')
|
|
|
|
->paginate();
|
|
|
|
return $this->response('success', Code::SUCCESS, $result);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|