Authored by 毕凯

Merge branch 'master' into release/4.8

... ... @@ -44,21 +44,13 @@ class Yohobuy
// const SERVICE_URL = 'http://preservice.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 登录老接口Api配置
*/
const API_LOGIN_URL = 'http://api.open.yohobuy.com';
const API_LOGIN_URL_TEST = 'http://test.open.yohobuy.com';
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 私钥列表
*
... ... @@ -71,11 +63,6 @@ class Yohobuy
'web' => '0ed29744ed318fd28d2c07985d3ba633',
'h5' => 'fd4ad5fcfa0de589ef238c0e7331b585',
);
<<<<<<< HEAD
=======
>>>>>>> master
/**
... ... @@ -89,11 +76,7 @@ class Yohobuy
else {
return 'web';
}
<<<<<<< HEAD
=======
>>>>>>> master
// // 苹果设备
// if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
// return 'iphone';
... ... @@ -203,11 +186,8 @@ class Yohobuy
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
<<<<<<< HEAD
if ($useGzip) {
=======
if ($useGzip) {
>>>>>>> master
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
}
if (!empty($userAgent)) {
... ... @@ -250,11 +230,7 @@ class Yohobuy
public static function post($url, $data = array(), $returnJson = false, $timeout = 10, $header = array(), $cookie = array())
{
$ch = curl_init($url);
<<<<<<< HEAD
=======
>>>>>>> master
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
if (!empty($header)) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
... ... @@ -376,11 +352,8 @@ class Yohobuy
continue;
}
$result[$name] = $response['data'];
<<<<<<< HEAD
}
=======
}
>>>>>>> master
else {
$result[$name] = $response;
}
... ... @@ -524,11 +497,7 @@ class Yohobuy
return $result;
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 获取用户User-Agent
* @return bool
... ... @@ -540,11 +509,7 @@ class Yohobuy
}
return $_SERVER['HTTP_USER_AGENT'];
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 判断是否手机
* @return bool
... ...