...
|
...
|
@@ -59,8 +59,8 @@ class HelperSearch |
|
|
$result = array();
|
|
|
self::$params = $_GET;
|
|
|
self::$options = $options;
|
|
|
unset(self::$params['/']);
|
|
|
unset(self::$params['page']);
|
|
|
// unset(self::$params['/']);
|
|
|
// unset(self::$params['page']);
|
|
|
self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array();
|
|
|
//产品列表
|
|
|
$result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options['imgSize']) : array();
|
...
|
...
|
@@ -157,7 +157,8 @@ class HelperSearch |
|
|
$goods_list[$k]['url'] = Helpers::getUrlBySkc($val['product_id'], $v['goods_id'], $val['cn_alphabet']);
|
|
|
//筛选符合颜色条件的封面图片
|
|
|
if (isset($params['color']) && $params['color'] == $v['color_id']) {
|
|
|
$val['default_images'] = Images::getImageUrl($v['images_url'],$imgSize[0],$imgSize[1]);
|
|
|
$val['default_images'] = $v['images_url'];
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($val['default_images'])) {
|
...
|
...
|
@@ -432,7 +433,7 @@ class HelperSearch |
|
|
else {
|
|
|
$this_brand['index'] = strtolower($v['brand_alif']);
|
|
|
}
|
|
|
//默认品牌
|
|
|
//默认品牌 TODO
|
|
|
if (count($result['default']) < 10) {
|
|
|
$result['default'][] = $this_brand;
|
|
|
}
|
...
|
...
|
@@ -440,6 +441,7 @@ class HelperSearch |
|
|
$brandList[$v['brand_alif']][] = $this_brand;
|
|
|
$brandAll[$v['id']] = $v['brand_name'];
|
|
|
}
|
|
|
// print_r($brandList); exit;
|
|
|
//清空品牌参数
|
|
|
unset($params['brand']);
|
|
|
//设置选中
|
...
|
...
|
@@ -450,8 +452,9 @@ class HelperSearch |
|
|
);
|
|
|
}
|
|
|
ksort($brandList);
|
|
|
//品牌列表排序, 添加品牌索引
|
|
|
//品牌列表排序, 添加品牌索引 TODO
|
|
|
$index_key = array();
|
|
|
// print_r($brandList); exit;
|
|
|
foreach ($brandList as $key => $val) {
|
|
|
if ($key && !in_array($key, $index_key) && !is_numeric($key)) {
|
|
|
$index['index'] = strtolower(($key));
|
...
|
...
|
@@ -581,18 +584,17 @@ class HelperSearch |
|
|
);
|
|
|
}else{
|
|
|
$price = explode(',', $priceId);
|
|
|
if (count($price) == 2) {
|
|
|
if (!$price[0]) {
|
|
|
$price[0] = 0;
|
|
|
}
|
|
|
if (!$price[1]) {
|
|
|
$price[1] = 99999;
|
|
|
}
|
|
|
self::$selected['price'] = array(
|
|
|
'name' => self::$params['price'] == '2000,99999' ? '¥2000以上' : '¥' . (int)$price[0] . '-' . (int)$price[1],
|
|
|
'href' => self::buildurl($params)
|
|
|
);
|
|
|
//TODO
|
|
|
if (!$price[0]) {
|
|
|
$price[0] = 0;
|
|
|
}
|
|
|
if (!$price[1]) {
|
|
|
$price[1] = 99999;
|
|
|
}
|
|
|
self::$selected['price'] = array(
|
|
|
'name' => self::$params['price'] == '2000,99999' ? '¥2000以上' : '¥' . (int)$price[0] . '-' . (int)$price[1],
|
|
|
'href' => self::buildurl($params)
|
|
|
);
|
|
|
}
|
|
|
if (self::checkSearch('price')) {
|
|
|
return array();
|
...
|
...
|
@@ -792,7 +794,7 @@ class HelperSearch |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 是否新品
|
|
|
* 是否新品 TODO
|
|
|
*/
|
|
|
public static function isnew()
|
|
|
{
|
...
|
...
|
@@ -1096,7 +1098,7 @@ class HelperSearch |
|
|
//组织静态资源数据格式
|
|
|
public static function getNodeContent($code)
|
|
|
{
|
|
|
$nodeContent = BrandData::getByNodeContent($code);
|
|
|
$nodeContent = BrandData::getByNodeContent($code);//TODO异步
|
|
|
if (isset($nodeContent['code']) && $nodeContent['code'] === 200) {
|
|
|
$result = array();
|
|
|
|
...
|
...
|
@@ -1288,7 +1290,7 @@ class HelperSearch |
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取品牌店铺接口地址
|
|
|
* 获取品牌店铺接口地址 TODO
|
|
|
* @param $param
|
|
|
* @return string
|
|
|
*/
|
...
|
...
|
|