Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
40ef4566faf23ceb38a2061af5dfc7ff41d107a5
2 parents
ffd00c56
c6d2c493
Merge branch 'master' into release/4.8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
37 deletions
library/Api/Yohobuy.php
library/Api/Yohobuy.php
View file @
40ef456
...
...
@@ -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
...
...
Please
register
or
login
to post a comment