|
@@ -136,7 +136,7 @@ class AdsController extends BaseController |
|
@@ -136,7 +136,7 @@ class AdsController extends BaseController |
|
136
|
$channel = Project::where('id', $domain_info['project_id'])->value('channel');
|
136
|
$channel = Project::where('id', $domain_info['project_id'])->value('channel');
|
|
137
|
$data = [
|
137
|
$data = [
|
|
138
|
'is_v6' => 1,
|
138
|
'is_v6' => 1,
|
|
139
|
- 'agent' => Channel::getChannelText($channel['user_id']??0),
|
139
|
+ 'agent' => trim(explode(',', Channel::getChannelText($channel['user_id']??0))[0]),
|
|
140
|
'domain' => $domain,
|
140
|
'domain' => $domain,
|
|
141
|
];
|
141
|
];
|
|
142
|
return $this->response('success', Code::SUCCESS, $data);
|
142
|
return $this->response('success', Code::SUCCESS, $data);
|
|
@@ -144,7 +144,10 @@ class AdsController extends BaseController |
|
@@ -144,7 +144,10 @@ class AdsController extends BaseController |
|
144
|
|
144
|
|
|
145
|
$token = md5($domain.'qqs');
|
145
|
$token = md5($domain.'qqs');
|
|
146
|
try {
|
146
|
try {
|
|
147
|
- $res = HttpUtils::get('https://quanqiusou.cn/extend_api/api/get_agent_by_domain.php', ['token' => $token, 'domain' => $domain]);
|
147
|
+ $client = new \GuzzleHttp\Client();
|
|
|
|
148
|
+ $res = $client->request('GET', 'https://quanqiusou.cn/extend_api/api/get_agent_by_domain.php?'.http_build_query(['token' => $token, 'domain' => $domain]), [
|
|
|
|
149
|
+ 'proxy' => env('CURL_PROXY'), // 代理服务器地址和端口号
|
|
|
|
150
|
+ ])->getBody()->getContents();
|
|
148
|
$res = Arr::s2a($res);
|
151
|
$res = Arr::s2a($res);
|
|
149
|
} catch (\Exception | GuzzleException $e) {
|
152
|
} catch (\Exception | GuzzleException $e) {
|
|
150
|
return $this->response('验证失败,请稍后再试!', Code::USER_ERROR, []);
|
153
|
return $this->response('验证失败,请稍后再试!', Code::USER_ERROR, []);
|
|
@@ -152,9 +155,14 @@ class AdsController extends BaseController |
|
@@ -152,9 +155,14 @@ class AdsController extends BaseController |
|
152
|
if(empty($res['status']) || $res['status'] != 200){
|
155
|
if(empty($res['status']) || $res['status'] != 200){
|
|
153
|
return $this->response($res['msg'], Code::USER_ERROR, []);
|
156
|
return $this->response($res['msg'], Code::USER_ERROR, []);
|
|
154
|
}
|
157
|
}
|
|
|
|
158
|
+
|
|
|
|
159
|
+ $agent = implode(',', array_map(function ($v){
|
|
|
|
160
|
+ return trim(explode('-', $v)[0]);
|
|
|
|
161
|
+ }, explode(',', $res['data'] ?? '')));
|
|
|
|
162
|
+
|
|
155
|
$data = [
|
163
|
$data = [
|
|
156
|
'is_v6' => 0,
|
164
|
'is_v6' => 0,
|
|
157
|
- 'agent' => $res['data'],
|
165
|
+ 'agent' => $agent,
|
|
158
|
'domain' => $domain,
|
166
|
'domain' => $domain,
|
|
159
|
];
|
167
|
];
|
|
160
|
return $this->response('success', Code::SUCCESS, $data);
|
168
|
return $this->response('success', Code::SUCCESS, $data);
|
|
@@ -218,4 +226,28 @@ class AdsController extends BaseController |
|
@@ -218,4 +226,28 @@ class AdsController extends BaseController |
|
218
|
->paginate();
|
226
|
->paginate();
|
|
219
|
return $this->response('success', Code::SUCCESS, $result);
|
227
|
return $this->response('success', Code::SUCCESS, $result);
|
|
220
|
}
|
228
|
}
|
|
|
|
229
|
+
|
|
|
|
230
|
+ public function fbRelayCount(Request $request){
|
|
|
|
231
|
+ $task_id = intval($request->input('task_id'));
|
|
|
|
232
|
+ $domain = trim($request->input('domain'));
|
|
|
|
233
|
+ $company = trim($request->input('company'));
|
|
|
|
234
|
+ $num = trim($request->input('num'));
|
|
|
|
235
|
+
|
|
|
|
236
|
+ $result = ReInquiryDetail::with('detailLog')
|
|
|
|
237
|
+ ->when($status, function ($query, $status) {
|
|
|
|
238
|
+ return $query->where('status', $status);
|
|
|
|
239
|
+ })
|
|
|
|
240
|
+ ->when($form_id, function ($query, $form_id) {
|
|
|
|
241
|
+ return $query->where('form_id', $form_id);
|
|
|
|
242
|
+ })
|
|
|
|
243
|
+ ->when($task_id, function ($query, $task_id) {
|
|
|
|
244
|
+ return $query->where('task_id', $task_id);
|
|
|
|
245
|
+ })
|
|
|
|
246
|
+ ->when($country, function ($query, $country) {
|
|
|
|
247
|
+ return $query->where('country', 'like', '%'.$country.'%');
|
|
|
|
248
|
+ })
|
|
|
|
249
|
+ ->orderBy('id', 'desc')
|
|
|
|
250
|
+ ->paginate();
|
|
|
|
251
|
+ return $this->response('success', Code::SUCCESS, $result);
|
|
|
|
252
|
+ }
|
|
221
|
} |
253
|
} |