Authored by yangyang

sale页分类链接去除specialsale_id的问题

@@ -350,6 +350,14 @@ class HelperSearch @@ -350,6 +350,14 @@ class HelperSearch
350 ); 350 );
351 $sortList = array(); 351 $sortList = array();
352 352
  353 + //specialsale_id参数加上
  354 + $specialsaleParam = array();
  355 + if (self::$options['controller'] == 'Sale') {
  356 + $specialsaleParam = array(
  357 + 'specialsale_id' => isset(self::$params['specialsale_id']) ? self::$params['specialsale_id'] : ''
  358 + );
  359 + }
  360 +
353 foreach ($sort as $key => $val) { 361 foreach ($sort as $key => $val) {
354 //是否有品牌 362 //是否有品牌
355 if ($options['action'] != 'brand' && $options['controller'] != 'Index') { 363 if ($options['action'] != 'brand' && $options['controller'] != 'Index') {
@@ -379,13 +387,13 @@ class HelperSearch @@ -379,13 +387,13 @@ class HelperSearch
379 $sortList[$key]['name'] = $val['sort_name']; 387 $sortList[$key]['name'] = $val['sort_name'];
380 $sortList[$key]['active'] = isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id'] ? true : false; 388 $sortList[$key]['active'] = isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id'] ? true : false;
381 $sortList[$key]['childList'][] = array( 389 $sortList[$key]['childList'][] = array(
382 - 'name' => '全部分类', 390 + 'name' => '全部'.$val['sort_name'],
383 'href' => self::buildUrl(array_merge($gender, array('msort'=>$val['sort_id']))) 391 'href' => self::buildUrl(array_merge($gender, array('msort'=>$val['sort_id'])))
384 ); 392 );
385 if (isset($val['sub']) && !empty($val['sub'])) { 393 if (isset($val['sub']) && !empty($val['sub'])) {
386 foreach ($val['sub'] as $k => $v) { 394 foreach ($val['sub'] as $k => $v) {
387 $sortList[$key]['childList'][$k+1]['name'] = $v['sort_name']; 395 $sortList[$key]['childList'][$k+1]['name'] = $v['sort_name'];
388 - $sortList[$key]['childList'][$k+1]['href'] = self::buildUrl(array_merge($gender, array('msort' => $val['sort_id'], 'misort' => $v['sort_id']))); 396 + $sortList[$key]['childList'][$k+1]['href'] = self::buildUrl(array_merge($gender, array('msort' => $val['sort_id'], 'misort' => $v['sort_id']), $specialsaleParam));
389 $sortList[$key]['childList'][$k+1]['childActive'] = isset(self::$params['misort']) && self::$params['misort'] == $v['sort_id'] ? true : false; 397 $sortList[$key]['childList'][$k+1]['childActive'] = isset(self::$params['misort']) && self::$params['misort'] == $v['sort_id'] ? true : false;
390 } 398 }
391 } 399 }
@@ -1091,6 +1099,7 @@ class HelperSearch @@ -1091,6 +1099,7 @@ class HelperSearch
1091 public static function current() 1099 public static function current()
1092 { 1100 {
1093 $url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); 1101 $url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
  1102 + print_r($url[0]);
1094 return $url[0]; 1103 return $url[0];
1095 } 1104 }
1096 /** 1105 /**
@@ -30,7 +30,6 @@ class SaleController extends WebAction @@ -30,7 +30,6 @@ class SaleController extends WebAction
30 $special = array(); 30 $special = array();
31 } 31 }
32 32
33 -  
34 $condition = array(); 33 $condition = array();
35 //传品牌ID参数 34 //传品牌ID参数
36 if(!empty($special['brand_id'])){ 35 if(!empty($special['brand_id'])){
@@ -50,7 +49,6 @@ class SaleController extends WebAction @@ -50,7 +49,6 @@ class SaleController extends WebAction
50 ); 49 );
51 50
52 $saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo); 51 $saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo);
53 -  
54 $data = array( 52 $data = array(
55 //初始化js 53 //初始化js
56 'productListPage' => true, 54 'productListPage' => true,