...
|
...
|
@@ -128,7 +128,8 @@ class HelperSearch |
|
|
* @author sefon 2015-12-21 17:24:04
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getProductList($product,$imgSize){
|
|
|
public static function getProductList($product,$imgSize)
|
|
|
{
|
|
|
$goods = array();
|
|
|
foreach($product as $key => $val){
|
|
|
//NEW
|
...
|
...
|
@@ -171,7 +172,8 @@ class HelperSearch |
|
|
* @param $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function standard($filter) {
|
|
|
public static function standard($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$result = array();
|
|
|
foreach ($filter as $key => $val) {
|
...
|
...
|
@@ -216,7 +218,8 @@ class HelperSearch |
|
|
* 性别
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function gender($filter) {
|
|
|
public static function gender($filter)
|
|
|
{
|
|
|
if (empty($filter) || !isset($filter['gender']) || empty($filter['gender'])) {
|
|
|
return array();
|
|
|
}
|
...
|
...
|
@@ -342,7 +345,8 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function brand($filter) {
|
|
|
public static function brand($filter)
|
|
|
{
|
|
|
$options = self::$options;
|
|
|
//品牌列表返回空
|
|
|
if (isset($options['brandName'])) {
|
...
|
...
|
@@ -446,7 +450,8 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function size($filter) {
|
|
|
public static function size($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
|
|
|
if (isset($params['size'])) {
|
...
|
...
|
@@ -483,7 +488,8 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function color($filter) {
|
|
|
public static function color($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$colorId = isset($params['color']) && !empty(self::$params['color']) ? self::$params['color'] : '';
|
|
|
if (isset($params['color'])) {
|
...
|
...
|
@@ -519,7 +525,8 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function price($filter) {
|
|
|
public static function price($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$priceId = isset($params['price']) && !empty(self::$params['price']) ? self::$params['price'] : '';
|
|
|
if (isset($params['price'])) {
|
...
|
...
|
@@ -561,7 +568,8 @@ class HelperSearch |
|
|
/**
|
|
|
* 获取自定义价格要提交的地址
|
|
|
*/
|
|
|
public static function customPrice($filter) {
|
|
|
public static function customPrice($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$result = array(
|
|
|
'min' => '',
|
...
|
...
|
@@ -584,7 +592,8 @@ class HelperSearch |
|
|
* @param array $filter
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function style($filter) {
|
|
|
public static function style($filter)
|
|
|
{
|
|
|
$params = self::$params;
|
|
|
$styleIds = isset($params['style']) && !empty($params['style']) ? explode(',', $params['style']) : array();
|
|
|
if (isset($params['style'])) {
|
...
|
...
|
@@ -975,7 +984,8 @@ class HelperSearch |
|
|
/**
|
|
|
* 当前页地址
|
|
|
*/
|
|
|
public static function current(){
|
|
|
public static function current()
|
|
|
{
|
|
|
$url = explode('?', $_SERVER['REQUEST_URI']);
|
|
|
self::$listnav[0]['href'] = $url[0];
|
|
|
return $url[0];
|
...
|
...
|
@@ -983,7 +993,8 @@ class HelperSearch |
|
|
/**
|
|
|
* 下一页
|
|
|
*/
|
|
|
public static function next($total){
|
|
|
public static function next($total)
|
|
|
{
|
|
|
$param = self::$params;
|
|
|
$page = self::$page;
|
|
|
$next = array();
|
...
|
...
|
@@ -1024,13 +1035,14 @@ class HelperSearch |
|
|
* @param $viewNum
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public static function pager($total,$viewNum){
|
|
|
public static function pager($total, $viewNum){
|
|
|
$Paging = new Paging('Yoho');
|
|
|
return $Paging->setTotal($total)->setSize($viewNum)->view(0);
|
|
|
}
|
|
|
|
|
|
//组织静态资源数据格式
|
|
|
public static function formatNodeContent($code){
|
|
|
public static function formatNodeContent($code)
|
|
|
{
|
|
|
$nodeContent = BrandData::getByNodeContent($code);
|
|
|
if (isset($nodeContent['code']) && $nodeContent['code'] === 200) {
|
|
|
$result = array();
|
...
|
...
|
|