...
|
...
|
@@ -212,10 +212,9 @@ class Yohobuy |
|
|
}
|
|
|
|
|
|
$result = curl_exec($ch);
|
|
|
$httpCode = curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
|
|
|
|
|
//如果分流执行失败,则走原来的逻辑
|
|
|
if (USE_INTER_FACE_SHUNT && $httpCode !== 200) {
|
|
|
if (USE_INTER_FACE_SHUNT && curl_getinfo($ch,CURLINFO_HTTP_CODE) !== 200) {
|
|
|
curl_close($ch);
|
|
|
return self::_get($urlBack, $data, $cache, $returnJson, $timeout, $userAgent, $useGzip);
|
|
|
}
|
...
|
...
|
@@ -279,7 +278,6 @@ class Yohobuy |
|
|
UdpLog::debug('call api: ', $url);
|
|
|
|
|
|
$result = curl_exec($ch);
|
|
|
$httpCode = curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
|
|
if (!$returnJson && !empty($result)) {
|
|
|
$result = json_decode($result, true);
|
|
|
}
|
...
|
...
|
@@ -372,12 +370,8 @@ class Yohobuy |
|
|
}
|
|
|
$result = curl_exec($ch);
|
|
|
|
|
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
|
|
|
|
UdpLog::debug('post api', array('url' => $url, 'httpCode' => $httpCode));
|
|
|
|
|
|
//如果分流执行失败,则走原来的逻辑
|
|
|
if (USE_INTER_FACE_SHUNT && $httpCode !== 200) {
|
|
|
if (USE_INTER_FACE_SHUNT && curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
|
|
|
curl_close($ch);
|
|
|
return self::_post($urlBack, $data, $returnJson, $timeout, $header, $cookie);
|
|
|
}
|
...
|
...
|
|