...
|
...
|
@@ -4,9 +4,10 @@ namespace LibModels\Wap\Guang; |
|
|
|
|
|
use Api\Sign;
|
|
|
use Api\Yohobuy;
|
|
|
use Plugin\Helpers;
|
|
|
use Configs\CacheConfig;
|
|
|
use Plugin\Helpers;
|
|
|
use Plugin\Cache;
|
|
|
use LibModels\Wap\Product\SearchData;
|
|
|
|
|
|
/**
|
|
|
* 明星品牌和原创品牌相关的数据模型
|
...
|
...
|
@@ -19,7 +20,6 @@ use Plugin\Cache; |
|
|
*/
|
|
|
class PlusstarData
|
|
|
{
|
|
|
|
|
|
const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
|
|
|
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/';
|
|
|
const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
|
...
|
...
|
@@ -162,16 +162,24 @@ class PlusstarData |
|
|
$result['getUidProductFav'] = array();
|
|
|
|
|
|
do {
|
|
|
// 调用搜索接口
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.search.li';
|
|
|
$param['brand'] = $brandInfo['data']['brand_id'];
|
|
|
$param['page'] = '0';
|
|
|
$param['limit'] = '6';
|
|
|
$param['gender'] = $gender;
|
|
|
$param['order'] = 's_t_desc';
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
$newProduct = Yohobuy::get(Yohobuy::API_URL, $param, 1800); // 缓存30分钟
|
|
|
// // 调用搜索接口
|
|
|
// $param = Yohobuy::param();
|
|
|
// $param['method'] = 'app.search.li';
|
|
|
// $param['brand'] = $brandInfo['data']['brand_id'];
|
|
|
// $param['page'] = '0';
|
|
|
// $param['limit'] = '6';
|
|
|
// $param['gender'] = $gender;
|
|
|
// $param['order'] = 's_t_desc';
|
|
|
// $param['client_secret'] = Sign::getSign($param);
|
|
|
// $newProduct = Yohobuy::get(Yohobuy::API_URL, $param, 1800); // 缓存30分钟
|
|
|
|
|
|
$condition = array();
|
|
|
$condition['brand'] = $brandInfo['data']['brand_id'];
|
|
|
$condition['gender'] = $gender;
|
|
|
$condition['limit'] = 6;
|
|
|
$condition['order'] = 's_t_desc';
|
|
|
$newProduct = SearchData::searchElasticByCondition($condition, 1800); // 有缓存30分钟
|
|
|
|
|
|
if (empty($newProduct['data']['product_list'])) {
|
|
|
break;
|
|
|
}
|
...
|
...
|
|