Authored by hf

Merge branch 'test' into develop

@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.css"> 25 +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.css">
26 </head> 26 </head>
27 <body class=passport-body> 27 <body class=passport-body>
28 <div class="back-email-page passport-page yoho-page"> 28 <div class="back-email-page passport-page yoho-page">
@@ -36,8 +36,8 @@ @@ -36,8 +36,8 @@
36 <span id="btn-sure" class="btn btn-sure disable row">确定</span> 36 <span id="btn-sure" class="btn btn-sure disable row">确定</span>
37 </div> 37 </div>
38 </div> 38 </div>
39 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/lib.js"></script>  
40 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.js"></script> 39 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/lib.js"></script>
  40 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.js"></script>
41 <script> 41 <script>
42 seajs.use('js/common'); 42 seajs.use('js/common');
43 </script> 43 </script>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.css"> 25 +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.css">
26 </head> 26 </head>
27 <body class=passport-body> 27 <body class=passport-body>
28 <div class="login-international-page passport-page yoho-page"> 28 <div class="login-international-page passport-page yoho-page">
@@ -57,8 +57,8 @@ @@ -57,8 +57,8 @@
57 <span id="btn-login" class="btn btn-login disble row">登录</span> 57 <span id="btn-login" class="btn btn-login disble row">登录</span>
58 </div> 58 </div>
59 </div> 59 </div>
60 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/lib.js"></script>  
61 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.js"></script> 60 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/lib.js"></script>
  61 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.js"></script>
62 <script> 62 <script>
63 seajs.use('js/common'); 63 seajs.use('js/common');
64 </script> 64 </script>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.css"> 25 +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.css">
26 </head> 26 </head>
27 <body class=passport-body> 27 <body class=passport-body>
28 <div class="back-mobile-page passport-page yoho-page"> 28 <div class="back-mobile-page passport-page yoho-page">
@@ -54,8 +54,8 @@ @@ -54,8 +54,8 @@
54 <span id="btn-next" class="btn btn-next disable row">下一步</span> 54 <span id="btn-next" class="btn btn-next disable row">下一步</span>
55 </div> 55 </div>
56 </div> 56 </div>
57 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/lib.js"></script>  
58 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.js"></script> 57 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/lib.js"></script>
  58 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.js"></script>
59 <script> 59 <script>
60 seajs.use('js/common'); 60 seajs.use('js/common');
61 </script> 61 </script>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.css"> 25 +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.css">
26 </head> 26 </head>
27 <body class=passport-body> 27 <body class=passport-body>
28 <div class="reg-page passport-page yoho-page"> 28 <div class="reg-page passport-page yoho-page">
@@ -55,8 +55,8 @@ @@ -55,8 +55,8 @@
55 <p class="register-tip">YOHO!Family账号可登录YOHO!有货、YOHO!Boys、YOHO!Girls及SHOW</p> 55 <p class="register-tip">YOHO!Family账号可登录YOHO!有货、YOHO!Boys、YOHO!Girls及SHOW</p>
56 </div> 56 </div>
57 </div> 57 </div>
58 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/lib.js"></script>  
59 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.js"></script> 58 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/lib.js"></script>
  59 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.js"></script>
60 <script> 60 <script>
61 seajs.use('js/common'); 61 seajs.use('js/common');
62 </script> 62 </script>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 -<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.css"> 25 +<link rel="stylesheet" href="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.css">
26 </head> 26 </head>
27 <body class=passport-body> 27 <body class=passport-body>
28 <div class="login-page passport-page yoho-page"> 28 <div class="login-page passport-page yoho-page">
@@ -69,8 +69,8 @@ @@ -69,8 +69,8 @@
69 </ul> 69 </ul>
70 </div> 70 </div>
71 </div> 71 </div>
72 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/lib.js"></script>  
73 -<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.1/index.js"></script> 72 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/lib.js"></script>
  73 +<script src="http://static.buy.test.yoho.cn/dist/myohobuy/0.0.6/index.js"></script>
74 <script> 74 <script>
75 seajs.use('js/common'); 75 seajs.use('js/common');
76 </script> 76 </script>
@@ -112,7 +112,7 @@ class NewsaleData @@ -112,7 +112,7 @@ class NewsaleData
112 112
113 $param['client_secret'] = Sign::getSign($param); 113 $param['client_secret'] = Sign::getSign($param);
114 114
115 - return Yohobuy::get(Yohobuy::API_URL, $param); 115 + return Yohobuy::get(Yohobuy::API_URL, $param, 600); // 缓存10分钟
116 } 116 }
117 117
118 /** 118 /**
1 <?php 1 <?php
2 2
3 namespace Plugin\DataProcess; 3 namespace Plugin\DataProcess;
  4 +
4 use Plugin\Helpers; 5 use Plugin\Helpers;
5 6
6 /** 7 /**
@@ -17,19 +18,16 @@ class ListProcess @@ -17,19 +18,16 @@ class ListProcess
17 */ 18 */
18 public static function getListData($data) 19 public static function getListData($data)
19 { 20 {
20 - $result = array('new'=>array(), 'filter'=>array()); 21 + $result = array('new' => array(), 'filter' => array());
21 22
22 - if(isset($data['product_list']))  
23 - { 23 + if (isset($data['product_list'])) {
24 $result['new'] = self::getProductData($data['product_list']); 24 $result['new'] = self::getProductData($data['product_list']);
25 } 25 }
26 - if(isset($data['filter']))  
27 - { 26 + if (isset($data['filter'])) {
28 $result['filter'] = self::getFilterData($data['filter']); 27 $result['filter'] = self::getFilterData($data['filter']);
29 } 28 }
30 29
31 return $result; 30 return $result;
32 -  
33 } 31 }
34 32
35 /** 33 /**
@@ -43,13 +41,11 @@ class ListProcess @@ -43,13 +41,11 @@ class ListProcess
43 // 处理商品 41 // 处理商品
44 $products = array(); 42 $products = array();
45 43
46 - foreach ($data as $value)  
47 - { 44 + foreach ($data as $value) {
48 $products[] = Helpers::formatProduct($value, true, true, true, true); 45 $products[] = Helpers::formatProduct($value, true, true, true, true);
49 } 46 }
50 47
51 return $products; 48 return $products;
52 -  
53 } 49 }
54 50
55 /** 51 /**
@@ -61,24 +57,23 @@ class ListProcess @@ -61,24 +57,23 @@ class ListProcess
61 public static function getFilterData($data) 57 public static function getFilterData($data)
62 { 58 {
63 // 过滤条件数据 59 // 过滤条件数据
64 - $filters = array('classify'=>array()); 60 + $filters = array('classify' => array());
65 61
66 $num = 1; 62 $num = 1;
  63 + $build = array();
67 foreach ($data as $key => $val) { 64 foreach ($data as $key => $val) {
68 - if(empty($val))  
69 - { 65 + if (empty($val)) {
70 continue; 66 continue;
71 } 67 }
72 if (!is_callable("self::$key")) { 68 if (!is_callable("self::$key")) {
73 continue; 69 continue;
74 } 70 }
75 $build = self::$key($val); 71 $build = self::$key($val);
76 - if($num === 1)  
77 - { 72 + if ($num === 1) {
78 $build['active'] = true; 73 $build['active'] = true;
79 } 74 }
80 75
81 - $num++; 76 + $num ++;
82 $filters['classify'][] = $build; 77 $filters['classify'][] = $build;
83 } 78 }
84 79
@@ -86,7 +81,6 @@ class ListProcess @@ -86,7 +81,6 @@ class ListProcess
86 self::sortArrByField($filters['classify'], 'sort_col'); 81 self::sortArrByField($filters['classify'], 'sort_col');
87 82
88 return $filters; 83 return $filters;
89 -  
90 } 84 }
91 85
92 private static function brand($data) 86 private static function brand($data)
@@ -165,7 +159,7 @@ class ListProcess @@ -165,7 +159,7 @@ class ListProcess
165 foreach ($data as $key => $one) { 159 foreach ($data as $key => $one) {
166 $discount = array(); 160 $discount = array();
167 $discount['dataId'] = $key; 161 $discount['dataId'] = $key;
168 - $discount['name'] = $one['name'] .'折商品'; 162 + $discount['name'] = $one['name'] . '折商品';
169 163
170 $result['subs'][] = $discount; 164 $result['subs'][] = $discount;
171 } 165 }
@@ -221,18 +215,18 @@ class ListProcess @@ -221,18 +215,18 @@ class ListProcess
221 $category['dataId'] = isset($one['relation_parameter']) ? $one['relation_parameter']['sort'] : 0; 215 $category['dataId'] = isset($one['relation_parameter']) ? $one['relation_parameter']['sort'] : 0;
222 $category['name'] = $one['category_name']; 216 $category['name'] = $one['category_name'];
223 217
224 - /*// 子品类(目前h5不支持二级)  
225 - if(isset($one['sub']))  
226 - {  
227 - $category['subs'] = array();  
228 - foreach ($one['sub'] as $single) {  
229 - $subitem = array();  
230 - $subitem['dataId'] = $single['category_id'];  
231 - $subitem['name'] = $single['category_name']; 218 + /* // 子品类(目前h5不支持二级)
  219 + if(isset($one['sub']))
  220 + {
  221 + $category['subs'] = array();
  222 + foreach ($one['sub'] as $single) {
  223 + $subitem = array();
  224 + $subitem['dataId'] = $single['category_id'];
  225 + $subitem['name'] = $single['category_name'];
232 226
233 - $category['subs'][] = $subitem;  
234 - }  
235 - }*/ 227 + $category['subs'][] = $subitem;
  228 + }
  229 + } */
236 230
237 $result['subs'][] = $category; 231 $result['subs'][] = $category;
238 } 232 }
@@ -285,7 +279,7 @@ class ListProcess @@ -285,7 +279,7 @@ class ListProcess
285 279
286 foreach ($data as $one) { 280 foreach ($data as $one) {
287 $size = array(); 281 $size = array();
288 - $size['dataId'] = $one['size_id']; 282 + $size['dataId'] = $one['size_id'];
289 $size['name'] = $one['size_name']; 283 $size['name'] = $one['size_name'];
290 284
291 $result['subs'][] = $size; 285 $result['subs'][] = $size;
@@ -301,7 +295,8 @@ class ListProcess @@ -301,7 +295,8 @@ class ListProcess
301 * @param string $field 字段名称 295 * @param string $field 字段名称
302 * @param boolean $desc 时候降序排列,默认为false 296 * @param boolean $desc 时候降序排列,默认为false
303 */ 297 */
304 - private static function sortArrByField(&$array, $field, $desc = false){ 298 + private static function sortArrByField(&$array, $field, $desc = false)
  299 + {
305 $fieldArr = array(); 300 $fieldArr = array();
306 foreach ($array as $k => $v) { 301 foreach ($array as $k => $v) {
307 $fieldArr[$k] = $v[$field]; 302 $fieldArr[$k] = $v[$field];
@@ -309,4 +304,5 @@ class ListProcess @@ -309,4 +304,5 @@ class ListProcess
309 $sort = $desc == false ? SORT_ASC : SORT_DESC; 304 $sort = $desc == false ? SORT_ASC : SORT_DESC;
310 array_multisort($fieldArr, $sort, $array); 305 array_multisort($fieldArr, $sort, $array);
311 } 306 }
  307 +
312 } 308 }
@@ -43,8 +43,7 @@ class NewSaleProcess @@ -43,8 +43,7 @@ class NewSaleProcess
43 // 处理商品 43 // 处理商品
44 if (isset($products['product_list'])) { 44 if (isset($products['product_list'])) {
45 foreach ($products['product_list'] as $single) { 45 foreach ($products['product_list'] as $single) {
46 -  
47 - $result['goods'][] = Helpers::formatProduct($single, true, false, false); 46 + $result['goods'][] = Helpers::formatProduct($single, true, false, false, 290, 388);
48 } 47 }
49 } 48 }
50 49
@@ -201,6 +201,14 @@ server @@ -201,6 +201,14 @@ server
201 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 201 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
202 proxy_set_header Accept-Encoding "gzip"; 202 proxy_set_header Accept-Encoding "gzip";
203 } 203 }
  204 + location ^~ /plustar {
  205 + proxy_redirect off;
  206 + proxy_pass http://yohobuy;
  207 + proxy_set_header Host $host;
  208 + proxy_set_header X-Real-IP $remote_addr;
  209 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  210 + proxy_set_header Accept-Encoding "gzip";
  211 + }
204 212
205 # 搜索相关 213 # 搜索相关
206 location ^~ /search { 214 location ^~ /search {
@@ -211,6 +219,14 @@ server @@ -211,6 +219,14 @@ server
211 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 219 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
212 proxy_set_header Accept-Encoding "gzip"; 220 proxy_set_header Accept-Encoding "gzip";
213 } 221 }
  222 + location ^~ /index/search {
  223 + proxy_redirect off;
  224 + proxy_pass http://yohobuy;
  225 + proxy_set_header Host $host;
  226 + proxy_set_header X-Real-IP $remote_addr;
  227 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  228 + proxy_set_header Accept-Encoding "gzip";
  229 + }
214 230
215 # 其它访问都跳到老版 231 # 其它访问都跳到老版
216 location / { 232 location / {
@@ -149,6 +149,9 @@ class SearchController extends AbstractAction @@ -149,6 +149,9 @@ class SearchController extends AbstractAction
149 $this->setTitle('搜索'); 149 $this->setTitle('搜索');
150 $this->setNavHeader('搜索', true, SITE_MAIN); 150 $this->setNavHeader('搜索', true, SITE_MAIN);
151 } 151 }
  152 +
  153 + // 右下角的购物车链接
  154 + $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null);
152 155
153 // // 查询数据 156 // // 查询数据
154 // if (!isset($condition['query'])) { 157 // if (!isset($condition['query'])) {
@@ -46,7 +46,6 @@ class NewsaleModel @@ -46,7 +46,6 @@ class NewsaleModel
46 switch (intval($channel)) { 46 switch (intval($channel)) {
47 case 1: // 男生 47 case 1: // 男生
48 $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS, self::CODE_TOP_NEW_BOYS); 48 $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_BOYS, self::CODE_TOP_NEW_BOYS);
49 -  
50 break; 49 break;
51 case 2: // 女生 50 case 2: // 女生
52 $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS, self::CODE_TOP_NEW_GIRLS); 51 $result = self::cacheControl(CacheConfig::KEY_ACTION_PRODUCT_NEWSALE_INDEX_GIRLS, self::CODE_TOP_NEW_GIRLS);
@@ -214,7 +213,7 @@ class NewsaleModel @@ -214,7 +213,7 @@ class NewsaleModel
214 213
215 if (isset($data['code']) && $data['code'] === 200) { 214 if (isset($data['code']) && $data['code'] === 200) {
216 foreach ($data['data']['product_list'] as $val) { 215 foreach ($data['data']['product_list'] as $val) {
217 - $result['goods'][] = Helpers::formatProduct($val, true, false, false); 216 + $result['goods'][] = Helpers::formatProduct($val, true, false, false, 299,388);
218 } 217 }
219 } 218 }
220 219
@@ -25,7 +25,7 @@ class ClassController extends AbstractAction @@ -25,7 +25,7 @@ class ClassController extends AbstractAction
25 'showDownloadApp' => true, 25 'showDownloadApp' => true,
26 'category' => array( 26 'category' => array(
27 'class' => $classes, 27 'class' => $classes,
28 - 'searchUrl' => Helpers::url('/search.html', null, 'search'), 28 + 'searchUrl' => Helpers::url('/search', null, 'search'),
29 ) 29 )
30 ); 30 );
31 31
@@ -51,6 +51,10 @@ class IndexController extends AbstractAction @@ -51,6 +51,10 @@ class IndexController extends AbstractAction
51 $this->setTitle($name); 51 $this->setTitle($name);
52 $this->setNavHeader($name, true, SITE_MAIN); 52 $this->setNavHeader($name, true, SITE_MAIN);
53 53
  54 + $goodList = array();
  55 + $goodList['cartUrl'] = Helpers::url('/cart/index/index', null);
  56 + $goodList += $condition;
  57 +
54 // $goodList = Product\ListModel::getClassData($condition); 58 // $goodList = Product\ListModel::getClassData($condition);
55 // if (!empty($condition) && !empty($goodList)) { 59 // if (!empty($condition) && !empty($goodList)) {
56 // $goodList = array_merge($goodList, $condition); 60 // $goodList = array_merge($goodList, $condition);
@@ -58,8 +62,8 @@ class IndexController extends AbstractAction @@ -58,8 +62,8 @@ class IndexController extends AbstractAction
58 $this->_view->display('index', array( 62 $this->_view->display('index', array(
59 'goodListPage' => true, 63 'goodListPage' => true,
60 'showDownloadApp' => true, 64 'showDownloadApp' => true,
61 - 'goodList' => $condition,  
62 - 'pageFooter' => true, 65 + 'goodList' => $goodList,
  66 + 'pageFooter' => true,
63 )); 67 ));
64 } 68 }
65 69
@@ -84,8 +88,9 @@ class IndexController extends AbstractAction @@ -84,8 +88,9 @@ class IndexController extends AbstractAction
84 /* 通过品牌域名找到对应的品牌ID */ 88 /* 通过品牌域名找到对应的品牌ID */
85 $domainList = Product\ListModel::getAllBrandDomains(); 89 $domainList = Product\ListModel::getAllBrandDomains();
86 $brandIds = array_keys($domainList, $domain); 90 $brandIds = array_keys($domainList, $domain);
87 - if (!isset($brandIds[0])) {  
88 - $this->go(SITE_MAIN); 91 + $brandId = 0;
  92 + if (isset($brandIds[0])) {
  93 + $brandId = $brandIds[0];
89 } 94 }
90 95
91 // 当前的登录用户UID 96 // 当前的登录用户UID
@@ -108,8 +113,8 @@ class IndexController extends AbstractAction @@ -108,8 +113,8 @@ class IndexController extends AbstractAction
108 'discount' => FILTER_VALIDATE_INT, 113 'discount' => FILTER_VALIDATE_INT,
109 'gender' => FILTER_DEFAULT, 114 'gender' => FILTER_DEFAULT,
110 'p_d' => FILTER_DEFAULT,), false); 115 'p_d' => FILTER_DEFAULT,), false);
111 - $condition['brand'] = $brandIds[0];  
112 - 116 + $condition['brand'] = $brandId;
  117 +
113 if (isset($condition['gender'])) { 118 if (isset($condition['gender'])) {
114 $condition['gender'] = rawurldecode($condition['gender']); 119 $condition['gender'] = rawurldecode($condition['gender']);
115 } 120 }
@@ -120,15 +125,18 @@ class IndexController extends AbstractAction @@ -120,15 +125,18 @@ class IndexController extends AbstractAction
120 // 从搜索页过来的,显示搜索框, 和进入品牌引导信息 125 // 从搜索页过来的,显示搜索框, 和进入品牌引导信息
121 if ($from === 'search') { 126 if ($from === 'search') {
122 $data['goodList'] = array(); 127 $data['goodList'] = array();
123 - $data['goodList']['brandWay'] = \Product\ListModel::getBrandLogoByIds($brandIds[0], $title); 128 + $data['goodList']['brandWay'] = \Product\ListModel::getBrandLogoByIds($brandId, $title);
124 $data['goodList']['search']['default'] = $query; 129 $data['goodList']['search']['default'] = $query;
125 $data['goodList']['search']['url'] = Helpers::url('', null, 'search'); 130 $data['goodList']['search']['url'] = Helpers::url('', null, 'search');
126 } 131 }
127 // 品牌一览过来的展示品牌介绍和LOGO 132 // 品牌一览过来的展示品牌介绍和LOGO
128 else { 133 else {
129 - $data['brandHome'] = \Product\ListModel::getBrandIntro($brandIds[0], $uid, $title); 134 + $data['brandHome'] = \Product\ListModel::getBrandIntro($brandId, $uid, $title);
130 $data['goodList'] = array(); 135 $data['goodList'] = array();
131 } 136 }
  137 +
  138 + // 右下角的购物车链接
  139 + $data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null);
132 $data['goodList'] += $condition; 140 $data['goodList'] += $condition;
133 $data['pageFooter'] = true; 141 $data['pageFooter'] = true;
134 142
@@ -33,7 +33,8 @@ class NewsaleController extends AbstractAction @@ -33,7 +33,8 @@ class NewsaleController extends AbstractAction
33 'price' => '0', 33 'price' => '0',
34 'size' => '0', 34 'size' => '0',
35 'dayLimit' => 1, 35 'dayLimit' => 1,
36 - 'discount' => '' 36 + 'discount' => '',
  37 + 'goodList' => array('cartUrl' => Helpers::url('/cart/index/index', null)),
37 ); 38 );
38 39
39 $this->_view->display('new', $data); 40 $this->_view->display('new', $data);
@@ -61,7 +62,8 @@ class NewsaleController extends AbstractAction @@ -61,7 +62,8 @@ class NewsaleController extends AbstractAction
61 'gender' => Helpers::getGenderByCookie(), 62 'gender' => Helpers::getGenderByCookie(),
62 'price' => '0', 63 'price' => '0',
63 'size' => '0', 64 'size' => '0',
64 - 'discount' => '0.1,0.9' 65 + 'discount' => '0.1,0.9',
  66 + 'goodList' => array('cartUrl' => Helpers::url('/cart/index/index', null)),
65 ); 67 );
66 68
67 $this->_view->display('sale', $data); 69 $this->_view->display('sale', $data);
@@ -97,7 +99,7 @@ class NewsaleController extends AbstractAction @@ -97,7 +99,7 @@ class NewsaleController extends AbstractAction
97 $channel = Helpers::getChannelByCookie(); 99 $channel = Helpers::getChannelByCookie();
98 100
99 $data = NewsaleData::selectNewSaleProducts( 101 $data = NewsaleData::selectNewSaleProducts(
100 - $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order 102 + $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
101 ); 103 );
102 $result = \Product\NewsaleModel::selectData($data); 104 $result = \Product\NewsaleModel::selectData($data);
103 } 105 }
@@ -63,17 +63,17 @@ routes.cate.route.action = Index @@ -63,17 +63,17 @@ routes.cate.route.action = Index
63 63
64 ; 品牌一览 64 ; 品牌一览
65 routes.brands.type = "rewrite" 65 routes.brands.type = "rewrite"
66 -routes.brands.match = "/brands" 66 +routes.brands.match = "/brands$"
67 routes.brands.route.module = Category 67 routes.brands.route.module = Category
68 routes.brands.route.controller = Brand 68 routes.brands.route.controller = Brand
69 routes.brands.route.action = Index 69 routes.brands.route.action = Index
70 70
71 ; 品牌一览搜索页 71 ; 品牌一览搜索页
72 -routes.brands.type = "rewrite"  
73 -routes.brands.match = "/brands/search"  
74 -routes.brands.route.module = Category  
75 -routes.brands.route.controller = Brand  
76 -routes.brands.route.action = Search 72 +routes.brandsearch.type = "rewrite"
  73 +routes.brandsearch.match = "/brands/search"
  74 +routes.brandsearch.route.module = Category
  75 +routes.brandsearch.route.controller = Brand
  76 +routes.brandsearch.route.action = Search
77 77
78 ; 新品到着(NEW) 78 ; 新品到着(NEW)
79 routes.productnew.type = "rewrite" 79 routes.productnew.type = "rewrite"
@@ -104,10 +104,10 @@ routes.goodsfilter.route.controller = Search @@ -104,10 +104,10 @@ routes.goodsfilter.route.controller = Search
104 routes.goodsfilter.route.action = Filter 104 routes.goodsfilter.route.action = Filter
105 105
106 ; 品牌搜索 106 ; 品牌搜索
107 -routes.productnew.type = "rewrite"  
108 -routes.productnew.match = "/brands/search$"  
109 -routes.productnew.route.module = Category  
110 -routes.productnew.route.controller = Brand  
111 -routes.productnew.route.action = Search 107 +routes.brandsearch.type = "rewrite"
  108 +routes.brandsearch.match = "/brands/search$"
  109 +routes.brandsearch.route.module = Category
  110 +routes.brandsearch.route.controller = Brand
  111 +routes.brandsearch.route.action = Search
112 112
113 113