...
|
...
|
@@ -402,7 +402,7 @@ class HelperSearch |
|
|
$existName .= $brandAll[$val].'、';
|
|
|
}
|
|
|
if ($existBrandNum === 1){
|
|
|
$existName .= $brandAll[$val].'...';
|
|
|
$existName .= substr($brandAll[$val], 0, 3).'...';
|
|
|
}
|
|
|
$existBrandNum++;
|
|
|
}
|
...
|
...
|
@@ -410,10 +410,13 @@ class HelperSearch |
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
self::$selected['brand'] = array(
|
|
|
'name' => $existName,
|
|
|
'href' => self::buildUrl($params)
|
|
|
);
|
|
|
//设置选中
|
|
|
if (isset(self::$params['brand']) && !empty(self::$params['brand'])) {
|
|
|
self::$selected['brand'] = array(
|
|
|
'name' => rtrim($existName, '、'),
|
|
|
'href' => self::buildUrl($params)
|
|
|
);
|
|
|
}
|
|
|
ksort($brandList);
|
|
|
//品牌列表排序, 添加品牌索引
|
|
|
$index_key = array();
|
...
|
...
|
@@ -443,9 +446,13 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function size($filter)
|
|
|
public static function size($filter, $isAjax = false)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$paramsValue = array_filter($params);
|
|
|
if (!$isAjax && empty($paramsValue)) {
|
|
|
return array();
|
|
|
}
|
|
|
$sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
|
|
|
if (isset($params['size'])) {
|
|
|
unset($params['size']);
|
...
|
...
|
@@ -705,7 +712,7 @@ class HelperSearch |
|
|
$selected = true;
|
|
|
}
|
|
|
else {
|
|
|
$params['specialoffer'] = 1;
|
|
|
$params['specialoffer'] = 'Y';
|
|
|
}
|
|
|
return array(
|
|
|
'name' => '打折',
|
...
|
...
|
@@ -742,12 +749,12 @@ class HelperSearch |
|
|
{
|
|
|
$params = self::$params;
|
|
|
$selected = '';
|
|
|
if (isset($params['isNew']) && !empty($params['isNew'])) {
|
|
|
unset($params['isNew']);
|
|
|
if (isset($params['new']) && !empty($params['new'])) {
|
|
|
unset($params['new']);
|
|
|
$selected = true;
|
|
|
}
|
|
|
else {
|
|
|
$params['isNew'] = 'Y';
|
|
|
$params['new'] = 'Y';
|
|
|
}
|
|
|
return array(
|
|
|
'name' => '新品',
|
...
|
...
|
@@ -854,7 +861,6 @@ class HelperSearch |
|
|
)));
|
|
|
$active = '';
|
|
|
$desc = true;
|
|
|
|
|
|
}
|
|
|
else if (self::$params['order'] == 'p_d_asc') {
|
|
|
$url = self::buildUrl(array_merge($params, array(
|
...
|
...
|
@@ -920,6 +926,7 @@ class HelperSearch |
|
|
if ($data) {
|
|
|
$result['conditions'] = $data;
|
|
|
}
|
|
|
// print_r($result); exit;
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1305,7 +1312,8 @@ class HelperSearch |
|
|
elseif ($type == 'shop') {
|
|
|
return 'http://101.200.31.165/yohosearch/shops.json';
|
|
|
}
|
|
|
return 'http://192.168.10.64:8080/yohosearch/search-once.json';
|
|
|
return 'http://101.200.31.165/yohosearch/search.json';
|
|
|
// return 'http://192.168.10.64:8080/yohosearch/search-once.json';
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|