|
...
|
...
|
@@ -123,7 +123,7 @@ class postInquiry extends Command |
|
|
|
'referrer_url' => $detail['referrer'],
|
|
|
|
'user_agent' => $detail['user_agent'],
|
|
|
|
];
|
|
|
|
$res = Http::withoutVerifying()->timeout(10)->post($website . 'api/traffic_visit/', $data)->json();
|
|
|
|
$res = Http::withoutVerifying()->timeout(30)->post($website . 'api/traffic_visit/', $data)->json();
|
|
|
|
if (empty($res['status']) || $res['status'] != 200) {
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
|
|
|
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
|
|
...
|
...
|
@@ -219,7 +219,7 @@ class postInquiry extends Command |
|
|
|
} else {
|
|
|
|
$data['__amp_source_origin'] = trim($website, '/');
|
|
|
|
}
|
|
|
|
$res = Http::withoutVerifying()->timeout(10)->withHeaders(['User-Agent' => $detail['user_agent']])->post($website . 'api/inquiryQd?source=5', $data)->json();
|
|
|
|
$res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($website . 'api/inquiryQd?source=5', $data)->json();
|
|
|
|
if (empty($res['code']) || $res['code'] != 200) {
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
|
|
|
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
|
|
...
|
...
|
@@ -243,7 +243,7 @@ class postInquiry extends Command |
|
|
|
'source' => 5,
|
|
|
|
];
|
|
|
|
|
|
|
|
$result = Http::withoutVerifying()->timeout(10)->post('https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f', $data);
|
|
|
|
$result = Http::withoutVerifying()->timeout(30)->post('https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f', $data);
|
|
|
|
$res = $result->json();
|
|
|
|
//兼容接口返回格式
|
|
|
|
if (!empty($res['data'][0]['status'])) {
|
|
...
|
...
|
@@ -273,7 +273,7 @@ class postInquiry extends Command |
|
|
|
ksort($data);
|
|
|
|
$data['token'] = md5( json_encode($data, JSON_UNESCAPED_UNICODE ) . date("Y-m-d"));
|
|
|
|
$url = 'https://' . $detail['re_website'] . '/index.php?route=api/ai_inquiry/add';
|
|
|
|
$res = Http::withoutVerifying()->timeout(10)->post($url, $data)->json();
|
|
|
|
$res = Http::withoutVerifying()->timeout(30)->post($url, $data)->json();
|
|
|
|
if (empty($res['code']) || $res['code'] != 200) {
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
|
|
|
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
|
|
...
|
...
|
@@ -292,7 +292,7 @@ class postInquiry extends Command |
|
|
|
'post_id' => $log['url'],
|
|
|
|
'message' => $detail['message'],
|
|
|
|
];
|
|
|
|
$res = Http::withoutVerifying()->timeout(10)->post('https://fob.ai.cc/api/ad_to_scrm', $data)->json();
|
|
|
|
$res = Http::withoutVerifying()->timeout(30)->post('https://fob.ai.cc/api/ad_to_scrm', $data)->json();
|
|
|
|
if (empty($res['status']) || $res['status'] != 200) {
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
|
|
|
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
|
...
|
...
|
|