Merge branch 'feature/newBlk' into 'release/5.7'
开发完成,修改默认参数,请求增加gender See merge request !534
Showing
2 changed files
with
6 additions
and
2 deletions
@@ -18,13 +18,13 @@ const qs = require('querystring'); | @@ -18,13 +18,13 @@ const qs = require('querystring'); | ||
18 | // 新品到着(blk) | 18 | // 新品到着(blk) |
19 | const blkNewGoods = (req, res, next) => { | 19 | const blkNewGoods = (req, res, next) => { |
20 | let params = Object.assign({ | 20 | let params = Object.assign({ |
21 | - isblknew: true | 21 | + isblknew: true, |
22 | + gender: req.query.gender || '1,3' | ||
22 | }, req.query); | 23 | }, req.query); |
23 | 24 | ||
24 | // 获取第一页数据做服务端渲染 | 25 | // 获取第一页数据做服务端渲染 |
25 | let uid = req.user.uid || 0; | 26 | let uid = req.user.uid || 0; |
26 | let initialData = _.assign({ | 27 | let initialData = _.assign({ |
27 | - gender: req.query.gender || '1,3', | ||
28 | type: 'default', | 28 | type: 'default', |
29 | order: '0', | 29 | order: '0', |
30 | page: 1, | 30 | page: 1, |
@@ -168,7 +168,11 @@ const _searchGoods = (params) => { | @@ -168,7 +168,11 @@ const _searchGoods = (params) => { | ||
168 | if (params.isblknew) { | 168 | if (params.isblknew) { |
169 | method = 'app.search.newProduct'; | 169 | method = 'app.search.newProduct'; |
170 | params.app_type = 1; | 170 | params.app_type = 1; |
171 | + if (params.type === 'default') { | ||
172 | + params.order = 's_t_asc'; | ||
173 | + } | ||
171 | } | 174 | } |
175 | + | ||
172 | if (params.promotion_id) { | 176 | if (params.promotion_id) { |
173 | method = 'app.search.promotion'; | 177 | method = 'app.search.promotion'; |
174 | } | 178 | } |
-
Please register or login to post a comment