...
|
...
|
@@ -63,13 +63,13 @@ class HelperSearch |
|
|
unset(self::$params['page']);
|
|
|
unset(self::$params['/sale']);
|
|
|
unset(self::$params['sale']);
|
|
|
$filter = $data['data']['filter'];
|
|
|
$filter = $data['product']['filter'];
|
|
|
//产品列表
|
|
|
$result['goods'] = self::getProductList($data['data']['product_list'], $options['imgSize']);
|
|
|
$result['goods'] = self::getProductList($data['product']['product_list'], $options['imgSize']);
|
|
|
//总页数
|
|
|
$result['page_total'] = $data['data']['page_total'];
|
|
|
$result['page_total'] = $data['product']['page_total'];
|
|
|
//当前页
|
|
|
$result['page'] = $data['data']['page'];
|
|
|
$result['page'] = $data['product']['page'];
|
|
|
self::$page = $result['page'];
|
|
|
//清除选中
|
|
|
$result['filters']['checkedConditions']['clearUrl'] = self::current();
|
...
|
...
|
@@ -99,25 +99,25 @@ class HelperSearch |
|
|
//可选每页显示数量
|
|
|
$result['opts']['pageCounts'] = self::viewNum();
|
|
|
$result['opts']['curPage'] = self::$page;
|
|
|
$result['opts']['pageCount'] = $data['data']['page_total'];
|
|
|
$result['opts']['nextHref'] = ($next = self::next($data['data']['page_total'],$data['data']['filter'])) ? $next['href'] : '';
|
|
|
$result['hasNextPage'] = self::next($data['data']['page_total']);
|
|
|
$result['opts']['pageCount'] = $data['product']['page_total'];
|
|
|
$result['opts']['nextHref'] = ($next = self::next($data['product']['page_total'],$data['product']['filter'])) ? $next['href'] : '';
|
|
|
$result['hasNextPage'] = self::next($data['product']['page_total']);
|
|
|
//分类条件
|
|
|
$result['filters']['sort'] = isset($filter['group_sort']) ? self::searchSort($filter['group_sort']) : array();
|
|
|
$result['filters']['sort'] = isset($data['sort']) ? self::searchSort($data['sort']['sort']) : array();
|
|
|
//左侧分类分类
|
|
|
$result['leftContent'][]['allSort'] = isset($filter['group_sort']) ? self::groupSort($filter['group_sort']) : array();
|
|
|
$result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array();
|
|
|
//一周新品上架
|
|
|
$result['leftContent'][]['newSales'] = isset($filter['recent']) ? self::recentShelve($filter['recent']) : array();
|
|
|
$result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']) : array();
|
|
|
//全部折扣
|
|
|
$result['leftContent'][]['allDiscount'] = isset($filter['discount']) ? self::getDiscount($filter['discount']) : array();
|
|
|
$result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array();
|
|
|
//总记录数
|
|
|
$result['totalCount'] = $data['data']['total'];
|
|
|
$result['totalCount'] = $data['product']['total'];
|
|
|
//分页
|
|
|
$result['pager'] = self::pager($result['totalCount'],$options['viewNum']);
|
|
|
//选中条件
|
|
|
$result['filters']['checkedConditions']['conditions'] = self::getSelected();
|
|
|
if (isset($options['controller']) && $options['controller'] == 'Search') {
|
|
|
self::setSearchNav($data['data']['total']);
|
|
|
self::setSearchNav($data['product']['total']);
|
|
|
}
|
|
|
$result['pathNav'] = self::$listnav;
|
|
|
return $result;
|
...
|
...
|
@@ -393,7 +393,7 @@ class HelperSearch |
|
|
'id' => $v['id'],
|
|
|
'href' => $url,
|
|
|
'name' => $v['brand_name'],
|
|
|
'key' => $v['brand_name'],
|
|
|
'key' => strtolower($v['brand_name']),
|
|
|
'active' => in_array($v['id'], $brandIds) ? true : false
|
|
|
);
|
|
|
if (is_numeric($v['brand_alif'])) {
|
...
|
...
|
@@ -426,7 +426,7 @@ class HelperSearch |
|
|
//品牌列表排序, 添加品牌索引
|
|
|
$index_key = array();
|
|
|
foreach ($brandList as $key => $val) {
|
|
|
if ($key && !in_array($key, $index_key)) {
|
|
|
if ($key && !in_array($key, $index_key) && !is_numeric($key)) {
|
|
|
$index['index'] = strtolower(($key));
|
|
|
$index['name'] = $key;
|
|
|
$result['brandIndex'][] = $index;
|
...
|
...
|
|