...
|
...
|
@@ -16,6 +16,7 @@ use Api\Sign; |
|
|
*/
|
|
|
class ListData
|
|
|
{
|
|
|
|
|
|
const URI_PRODUCT = 'shops/service/v1/product';
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -26,15 +27,22 @@ class ListData |
|
|
*/
|
|
|
public static function productInfoBySkns($skns)
|
|
|
{
|
|
|
// 调用搜索接口
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.search.li';
|
|
|
$param['query'] = implode(' ', $skns);
|
|
|
$param['limit'] = count($skns);
|
|
|
$param['order'] = 's_t_desc';
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
|
|
|
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
|
|
|
// // 调用搜索接口
|
|
|
// $param = Yohobuy::param();
|
|
|
// $param['method'] = 'app.search.li';
|
|
|
// $param['query'] = implode(' ', $skns);
|
|
|
// $param['limit'] = count($skns);
|
|
|
// $param['order'] = 's_t_desc';
|
|
|
// $param['client_secret'] = Sign::getSign($param);
|
|
|
//
|
|
|
// return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
|
|
|
|
|
|
$condition = array();
|
|
|
$condition['query'] = implode(' ', $skns);
|
|
|
$condition['limit'] = count($skns);
|
|
|
$condition['order'] = 's_t_desc';
|
|
|
|
|
|
return SearchData::searchElasticByCondition($condition, 3600); // 有缓存1小时
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|