Authored by 周少峰

helpSearch 修改不符合规范代码格式

@@ -128,7 +128,8 @@ class HelperSearch @@ -128,7 +128,8 @@ class HelperSearch
128 * @author sefon 2015-12-21 17:24:04 128 * @author sefon 2015-12-21 17:24:04
129 * @return array 129 * @return array
130 */ 130 */
131 - public static function getProductList($product,$imgSize){ 131 + public static function getProductList($product,$imgSize)
  132 + {
132 $goods = array(); 133 $goods = array();
133 foreach($product as $key => $val){ 134 foreach($product as $key => $val){
134 //NEW 135 //NEW
@@ -171,7 +172,8 @@ class HelperSearch @@ -171,7 +172,8 @@ class HelperSearch
171 * @param $filter 172 * @param $filter
172 * @return array 173 * @return array
173 */ 174 */
174 - public static function standard($filter) { 175 + public static function standard($filter)
  176 + {
175 $params = self::$params; 177 $params = self::$params;
176 $result = array(); 178 $result = array();
177 foreach ($filter as $key => $val) { 179 foreach ($filter as $key => $val) {
@@ -216,7 +218,8 @@ class HelperSearch @@ -216,7 +218,8 @@ class HelperSearch
216 * 性别 218 * 性别
217 * @return array 219 * @return array
218 */ 220 */
219 - public static function gender($filter) { 221 + public static function gender($filter)
  222 + {
220 if (empty($filter) || !isset($filter['gender']) || empty($filter['gender'])) { 223 if (empty($filter) || !isset($filter['gender']) || empty($filter['gender'])) {
221 return array(); 224 return array();
222 } 225 }
@@ -342,7 +345,8 @@ class HelperSearch @@ -342,7 +345,8 @@ class HelperSearch
342 * @param array $filter 345 * @param array $filter
343 * @return array 346 * @return array
344 */ 347 */
345 - public static function brand($filter) { 348 + public static function brand($filter)
  349 + {
346 $options = self::$options; 350 $options = self::$options;
347 //品牌列表返回空 351 //品牌列表返回空
348 if (isset($options['brandName'])) { 352 if (isset($options['brandName'])) {
@@ -446,7 +450,8 @@ class HelperSearch @@ -446,7 +450,8 @@ class HelperSearch
446 * @param array $filter 450 * @param array $filter
447 * @return array 451 * @return array
448 */ 452 */
449 - public static function size($filter) { 453 + public static function size($filter)
  454 + {
450 $params = self::$params; 455 $params = self::$params;
451 $sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : ''; 456 $sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
452 if (isset($params['size'])) { 457 if (isset($params['size'])) {
@@ -483,7 +488,8 @@ class HelperSearch @@ -483,7 +488,8 @@ class HelperSearch
483 * @param array $filter 488 * @param array $filter
484 * @return array 489 * @return array
485 */ 490 */
486 - public static function color($filter) { 491 + public static function color($filter)
  492 + {
487 $params = self::$params; 493 $params = self::$params;
488 $colorId = isset($params['color']) && !empty(self::$params['color']) ? self::$params['color'] : ''; 494 $colorId = isset($params['color']) && !empty(self::$params['color']) ? self::$params['color'] : '';
489 if (isset($params['color'])) { 495 if (isset($params['color'])) {
@@ -519,7 +525,8 @@ class HelperSearch @@ -519,7 +525,8 @@ class HelperSearch
519 * @param array $filter 525 * @param array $filter
520 * @return array 526 * @return array
521 */ 527 */
522 - public static function price($filter) { 528 + public static function price($filter)
  529 + {
523 $params = self::$params; 530 $params = self::$params;
524 $priceId = isset($params['price']) && !empty(self::$params['price']) ? self::$params['price'] : ''; 531 $priceId = isset($params['price']) && !empty(self::$params['price']) ? self::$params['price'] : '';
525 if (isset($params['price'])) { 532 if (isset($params['price'])) {
@@ -561,7 +568,8 @@ class HelperSearch @@ -561,7 +568,8 @@ class HelperSearch
561 /** 568 /**
562 * 获取自定义价格要提交的地址 569 * 获取自定义价格要提交的地址
563 */ 570 */
564 - public static function customPrice($filter) { 571 + public static function customPrice($filter)
  572 + {
565 $params = self::$params; 573 $params = self::$params;
566 $result = array( 574 $result = array(
567 'min' => '', 575 'min' => '',
@@ -584,7 +592,8 @@ class HelperSearch @@ -584,7 +592,8 @@ class HelperSearch
584 * @param array $filter 592 * @param array $filter
585 * @return array 593 * @return array
586 */ 594 */
587 - public static function style($filter) { 595 + public static function style($filter)
  596 + {
588 $params = self::$params; 597 $params = self::$params;
589 $styleIds = isset($params['style']) && !empty($params['style']) ? explode(',', $params['style']) : array(); 598 $styleIds = isset($params['style']) && !empty($params['style']) ? explode(',', $params['style']) : array();
590 if (isset($params['style'])) { 599 if (isset($params['style'])) {
@@ -975,7 +984,8 @@ class HelperSearch @@ -975,7 +984,8 @@ class HelperSearch
975 /** 984 /**
976 * 当前页地址 985 * 当前页地址
977 */ 986 */
978 - public static function current(){ 987 + public static function current()
  988 + {
979 $url = explode('?', $_SERVER['REQUEST_URI']); 989 $url = explode('?', $_SERVER['REQUEST_URI']);
980 self::$listnav[0]['href'] = $url[0]; 990 self::$listnav[0]['href'] = $url[0];
981 return $url[0]; 991 return $url[0];
@@ -983,7 +993,8 @@ class HelperSearch @@ -983,7 +993,8 @@ class HelperSearch
983 /** 993 /**
984 * 下一页 994 * 下一页
985 */ 995 */
986 - public static function next($total){ 996 + public static function next($total)
  997 + {
987 $param = self::$params; 998 $param = self::$params;
988 $page = self::$page; 999 $page = self::$page;
989 $next = array(); 1000 $next = array();
@@ -1024,13 +1035,14 @@ class HelperSearch @@ -1024,13 +1035,14 @@ class HelperSearch
1024 * @param $viewNum 1035 * @param $viewNum
1025 * @return mixed 1036 * @return mixed
1026 */ 1037 */
1027 - public static function pager($total,$viewNum){ 1038 + public static function pager($total, $viewNum){
1028 $Paging = new Paging('Yoho'); 1039 $Paging = new Paging('Yoho');
1029 return $Paging->setTotal($total)->setSize($viewNum)->view(0); 1040 return $Paging->setTotal($total)->setSize($viewNum)->view(0);
1030 } 1041 }
1031 1042
1032 //组织静态资源数据格式 1043 //组织静态资源数据格式
1033 - public static function formatNodeContent($code){ 1044 + public static function formatNodeContent($code)
  1045 + {
1034 $nodeContent = BrandData::getByNodeContent($code); 1046 $nodeContent = BrandData::getByNodeContent($code);
1035 if (isset($nodeContent['code']) && $nodeContent['code'] === 200) { 1047 if (isset($nodeContent['code']) && $nodeContent['code'] === 200) {
1036 $result = array(); 1048 $result = array();