Showing
1 changed file
with
12 additions
and
11 deletions
@@ -32,17 +32,16 @@ class HelperSearch | @@ -32,17 +32,16 @@ class HelperSearch | ||
32 | { | 32 | { |
33 | $options = self::$options; | 33 | $options = self::$options; |
34 | $channel = HomeModel::getSwitchChannel(); | 34 | $channel = HomeModel::getSwitchChannel(); |
35 | - $uri = '/'.$channel; | ||
36 | - | 35 | + $channelName = '/'.$channel; |
37 | if (isset($options['brandName']) && !empty($options['brandName'])) { | 36 | if (isset($options['brandName']) && !empty($options['brandName'])) { |
38 | - $brandNav = $options['brandNameEn'] . $options['brandNameCn']; | 37 | + $brandNav = $options['brandNameEn'] . ' ' . $options['brandNameCn']; |
39 | self::$listNav = array( | 38 | self::$listNav = array( |
40 | array( | 39 | array( |
41 | - 'href' => Helpers::url($uri), | ||
42 | - 'name' => strtoupper($channel).'首页' | 40 | + 'href' => Helpers::url($channelName), |
41 | + 'name' => strtoupper($channel) . '首页' | ||
43 | ), | 42 | ), |
44 | array( | 43 | array( |
45 | - 'href' => '', | 44 | + 'href' => Helpers::url('/brands/brands'), |
46 | 'name' => '品牌一览' | 45 | 'name' => '品牌一览' |
47 | ), | 46 | ), |
48 | array( | 47 | array( |
@@ -52,13 +51,16 @@ class HelperSearch | @@ -52,13 +51,16 @@ class HelperSearch | ||
52 | ); | 51 | ); |
53 | }else{ | 52 | }else{ |
54 | self::$listNav[0] = array( | 53 | self::$listNav[0] = array( |
55 | - 'href' => Helpers::url($uri), | 54 | + 'href' => Helpers::url($channelName), |
56 | 'name' => strtoupper($channel).'首页' | 55 | 'name' => strtoupper($channel).'首页' |
57 | ); | 56 | ); |
58 | - self::$listNav[1] = array( | 57 | + if ($options['action'] == 'new') { |
58 | + self::$listNav[1] = array( | ||
59 | 'href' => '', | 59 | 'href' => '', |
60 | - 'name' => $options['action'] == 'new' ? '新品到着' : '列表' | ||
61 | - ); | 60 | + 'name' => '新品到着' |
61 | + ); | ||
62 | + } | ||
63 | + | ||
62 | } | 64 | } |
63 | } | 65 | } |
64 | /** | 66 | /** |
@@ -1076,7 +1078,6 @@ class HelperSearch | @@ -1076,7 +1078,6 @@ class HelperSearch | ||
1076 | public static function current() | 1078 | public static function current() |
1077 | { | 1079 | { |
1078 | $url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); | 1080 | $url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); |
1079 | - self::$listNav[0]['href'] = $url[0]; | ||
1080 | return $url[0]; | 1081 | return $url[0]; |
1081 | } | 1082 | } |
1082 | /** | 1083 | /** |
-
Please register or login to post a comment