Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
9 years ago
Commit
7c3730f287fdc18e66430da6cbd4f638a2cb8d70
1 parent
dac40e50
'hot-product-api-change'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
library/LibModels/Wap/Product/SearchData.php
library/Plugin/DataProcess/ShopProcess.php
library/LibModels/Wap/Product/SearchData.php
View file @
7c3730f
...
...
@@ -109,6 +109,31 @@ class SearchData
}
/**
* 通过 SKN 查询商品
* @param $condition
* @return mixed
*/
public
static
function
searchBySkn
(
$condition
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'h5.product.batch'
;
if
(
!
isset
(
$condition
[
'order'
]))
{
$param
[
'order'
]
=
's_t_desc'
;
}
if
(
!
isset
(
$condition
[
'page'
]))
{
$param
[
'page'
]
=
1
;
}
if
(
!
isset
(
$condition
[
'limit'
]))
{
$param
[
'limit'
]
=
60
;
}
if
(
!
empty
(
$condition
))
{
$param
+=
$condition
;
}
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
API_URL
,
$param
);
}
/**
* 根据给定查询数据搜索数据列表 (新的)
*
* @param string $query 查询条件, 默认为null
...
...
library/Plugin/DataProcess/ShopProcess.php
View file @
7c3730f
...
...
@@ -305,7 +305,7 @@ class ShopProcess
}
/* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */
$hotProducts
=
SearchData
::
searchBy
Conditio
n
(
$condition
);
$hotProducts
=
SearchData
::
searchBy
Sk
n
(
$condition
);
if
(
isset
(
$hotProducts
[
'code'
])
&&
$hotProducts
[
'code'
]
===
200
&&
isset
(
$hotProducts
[
'data'
][
'product_list'
]))
{
foreach
(
$hotProducts
[
'data'
][
'product_list'
]
as
$val
)
{
...
...
Please
register
or
login
to post a comment