Authored by 周少峰

用户浏览记录

... ... @@ -18,12 +18,12 @@ class SearchData extends \LibModels\Wap\Product\SearchData
case 'release':
if($type == 'sort'){
return 'http://100.98.132.63/yohosearch/sortgroup.json';
}
if($type == 'discount'){
}elseif($type == 'discount'){
return 'http://100.98.132.63/yohosearch/discount.json';
}
if($type == 'recent'){
}elseif($type == 'recent'){
return 'http://100.98.132.63/yohosearch/recent.json';
}elseif($type == 'review'){
}
return 'http://100.98.132.63/yohosearch/search.json';
case 'test':
... ... @@ -33,11 +33,13 @@ class SearchData extends \LibModels\Wap\Product\SearchData
if($type == 'sort'){
return 'http://101.200.31.165/yohosearch/sortgroup.json';
}
if($type == 'discount'){
elseif($type == 'discount'){
return 'http://101.200.31.165/yohosearch/discount.json';
}
if($type == 'recent'){
elseif($type == 'recent'){
return 'http://101.200.31.165/yohosearch/recent.json';
}elseif($type == 'review'){
return 'http://itemapi.yohobuy.com/item/item/recentreview';
}
return 'http://101.200.31.165/yohosearch/search.json';
}
... ... @@ -125,4 +127,14 @@ class SearchData extends \LibModels\Wap\Product\SearchData
public static function recentShelve(){
return Yohobuy::get(self::getUrl('recent'));
}
/**
* 获取最近浏览记录
* @param int $limit
* @return json
*/
public static function getRecentReview($limit = 0)
{
}
}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,6 @@
namespace Product;
use Configs\CacheConfig;
use Plugin\HelperSearchNew;
use Plugin\Images;
use Plugin\Cache;
use Plugin\HelperSearch;
... ... @@ -51,6 +50,8 @@ class SearchModel
if (isset($discount['code']) && $discount['code'] === 200) {
$result['data']['filter']['recent'] = $recent['data']['recent'];
}
//用户浏览记录
$result['data']['filter']['review'] = SearchData::getRecentReview();
// 组织模板数据
$list = HelperSearch::getList($result, $options);
$data = array(
... ...