...
|
...
|
@@ -19,12 +19,9 @@ class SearchData extends \LibModels\Wap\Product\SearchData |
|
|
case 'release':
|
|
|
if($type == 'sort'){
|
|
|
return 'http://100.98.132.63/yohosearch/sortgroup.json';
|
|
|
}elseif($type == 'discount'){
|
|
|
return 'http://100.98.132.63/yohosearch/discount.json';
|
|
|
}elseif($type == 'recent'){
|
|
|
return 'http://100.98.132.63/yohosearch/recent.json';
|
|
|
}elseif($type == 'review'){
|
|
|
|
|
|
}
|
|
|
elseif($type == 'suggest'){
|
|
|
return 'http://100.98.132.63/yohosearch/suggest.json';
|
|
|
}
|
|
|
return 'http://100.98.132.63/yohosearch/search.json';
|
|
|
case 'test':
|
...
|
...
|
@@ -34,14 +31,10 @@ class SearchData extends \LibModels\Wap\Product\SearchData |
|
|
if($type == 'sort'){
|
|
|
return 'http://101.200.31.165/yohosearch/sortgroup.json';
|
|
|
}
|
|
|
elseif($type == 'discount'){
|
|
|
return 'http://101.200.31.165/yohosearch/discount.json';
|
|
|
}
|
|
|
elseif($type == 'recent'){
|
|
|
return 'http://101.200.31.165/yohosearch/recent.json';
|
|
|
}elseif($type == 'review'){
|
|
|
return 'http://itemapi.yohobuy.com/item/item/recentreview';
|
|
|
elseif($type == 'suggest'){
|
|
|
return 'http://101.200.31.165/yohosearch/suggest.json';
|
|
|
}
|
|
|
|
|
|
return 'http://101.200.31.165/yohosearch/search.json';
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -116,36 +109,19 @@ class SearchData extends \LibModels\Wap\Product\SearchData |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取折扣区间
|
|
|
*/
|
|
|
public static function getDiscount(){
|
|
|
return Yohobuy::get(self::getUrl('discount'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取最新上架
|
|
|
*/
|
|
|
public static function recentShelve(){
|
|
|
return Yohobuy::get(self::getUrl('recent'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 搜索品牌店铺信息
|
|
|
* @param array $params 参数
|
|
|
* 获取搜索提示
|
|
|
* @param $param
|
|
|
* @param $cache
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getShop(array $params)
|
|
|
{
|
|
|
return Yohobuy::get(self::$shopsUrl,$params);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取最近浏览记录
|
|
|
* @param int $limit
|
|
|
* @return json
|
|
|
*/
|
|
|
public static function getRecentReview($limit = 0)
|
|
|
public static function getSuggest($param, $cache = false)
|
|
|
{
|
|
|
|
|
|
if (empty($param['query'])) {
|
|
|
return array();
|
|
|
}
|
|
|
if (empty($param['size'])) {
|
|
|
$param['size'] = 10;
|
|
|
}
|
|
|
return Yohobuy::get(self::getUrl('suggest'),$param, $cache);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|