Merge branch 'release/5.2' of git.yoho.cn:fe/yohobuywap-node into release/5.2
Showing
7 changed files
with
42 additions
and
10 deletions
@@ -130,7 +130,6 @@ | @@ -130,7 +130,6 @@ | ||
130 | {{#unless @root.wap.ucenter.removePrefer}} | 130 | {{#unless @root.wap.ucenter.removePrefer}} |
131 | {{> common/recommend-for-you}} | 131 | {{> common/recommend-for-you}} |
132 | {{/unless}} | 132 | {{/unless}} |
133 | - {{> common/suspend-cart}} | ||
134 | </div> | 133 | </div> |
135 | 134 | ||
136 | {{> footer-tab}} | 135 | {{> footer-tab}} |
@@ -13,6 +13,24 @@ const newModel = require(`${mRoot}/new`); | @@ -13,6 +13,24 @@ const newModel = require(`${mRoot}/new`); | ||
13 | const _ = require('lodash'); | 13 | const _ = require('lodash'); |
14 | const helpers = global.yoho.helpers; | 14 | const helpers = global.yoho.helpers; |
15 | 15 | ||
16 | +// 新品到着(blk) | ||
17 | +const blkNewGoods = (req, res) => { | ||
18 | + let params = Object.assign({ | ||
19 | + isblknew: true | ||
20 | + }, req.query); | ||
21 | + | ||
22 | + res.render('search/goods-list', { | ||
23 | + module: 'product', | ||
24 | + page: 'search-list', | ||
25 | + pageHeader: headerModel.setNav({ | ||
26 | + navTitle: req.query.title || req.query.sort_name || '新品抢先看' | ||
27 | + }), | ||
28 | + goodList: params, | ||
29 | + showDownloadApp: true, | ||
30 | + pageFooter: true | ||
31 | + }); | ||
32 | +}; | ||
33 | + | ||
16 | // 新品到着 | 34 | // 新品到着 |
17 | const newGoods = (req, res, next) => { | 35 | const newGoods = (req, res, next) => { |
18 | let channel = req.cookies._Channel; | 36 | let channel = req.cookies._Channel; |
@@ -77,6 +95,7 @@ let filter = (req, res, next) => { | @@ -77,6 +95,7 @@ let filter = (req, res, next) => { | ||
77 | 95 | ||
78 | 96 | ||
79 | module.exports = { | 97 | module.exports = { |
98 | + blkNewGoods, | ||
80 | newGoods, | 99 | newGoods, |
81 | selectNewSale, | 100 | selectNewSale, |
82 | filter | 101 | filter |
@@ -25,7 +25,7 @@ const willStartActivity = { | @@ -25,7 +25,7 @@ const willStartActivity = { | ||
25 | // 奥莱首页控制器 | 25 | // 奥莱首页控制器 |
26 | exports.index = (req, res, next) => { | 26 | exports.index = (req, res, next) => { |
27 | let headerData = headerModel.setNav({ | 27 | let headerData = headerModel.setNav({ |
28 | - navTitle: 'OUTLET', | 28 | + navTitle: '奥莱', |
29 | navBtn: false | 29 | navBtn: false |
30 | }); | 30 | }); |
31 | 31 | ||
@@ -36,7 +36,7 @@ exports.index = (req, res, next) => { | @@ -36,7 +36,7 @@ exports.index = (req, res, next) => { | ||
36 | outletModel.getContent(categoryId, yhChannel, contentcode).then(result => { | 36 | outletModel.getContent(categoryId, yhChannel, contentcode).then(result => { |
37 | res.render('outlet', Object.assign({ | 37 | res.render('outlet', Object.assign({ |
38 | pageHeader: headerData, | 38 | pageHeader: headerData, |
39 | - title: 'OUTLET | Yoho!Buy有货 | 潮流购物逛不停', | 39 | + title: '奥莱 | Yoho!Buy有货 | 潮流购物逛不停', |
40 | }, result)); | 40 | }, result)); |
41 | }).catch(next); | 41 | }).catch(next); |
42 | }; | 42 | }; |
@@ -67,7 +67,7 @@ exports.activityTime = (req, res, next) => { | @@ -67,7 +67,7 @@ exports.activityTime = (req, res, next) => { | ||
67 | // 奥莱活动频道列表页 | 67 | // 奥莱活动频道列表页 |
68 | exports.activityList = (req, res, next) => { | 68 | exports.activityList = (req, res, next) => { |
69 | let headerData = headerModel.setNav({ | 69 | let headerData = headerModel.setNav({ |
70 | - navTitle: 'OUTLET', | 70 | + navTitle: '奥莱', |
71 | navBtn: false | 71 | navBtn: false |
72 | }); | 72 | }); |
73 | 73 |
@@ -15,7 +15,7 @@ const api = global.yoho.API; | @@ -15,7 +15,7 @@ const api = global.yoho.API; | ||
15 | 15 | ||
16 | const resourcesProcess = require(`${utils}/resources-process`); | 16 | const resourcesProcess = require(`${utils}/resources-process`); |
17 | 17 | ||
18 | -const dateFormate = (str) =>{ | 18 | +const dateFormate = (str) => { |
19 | var time = new Date(str * 1000); | 19 | var time = new Date(str * 1000); |
20 | var y = time.getFullYear(); | 20 | var y = time.getFullYear(); |
21 | var m = time.getMonth() + 1; | 21 | var m = time.getMonth() + 1; |
@@ -85,7 +85,9 @@ const _convertNavData = (list) => { | @@ -85,7 +85,9 @@ const _convertNavData = (list) => { | ||
85 | }); | 85 | }); |
86 | }); | 86 | }); |
87 | 87 | ||
88 | - return {data: formatData}; | 88 | + return { |
89 | + data: formatData | ||
90 | + }; | ||
89 | }; | 91 | }; |
90 | 92 | ||
91 | /** | 93 | /** |
@@ -235,7 +237,7 @@ const getActivity = (id) => { | @@ -235,7 +237,7 @@ const getActivity = (id) => { | ||
235 | return { | 237 | return { |
236 | activity: res, | 238 | activity: res, |
237 | productPool: res[0] && res[0].productPoolId || '', | 239 | productPool: res[0] && res[0].productPoolId || '', |
238 | - activityTitle: res[0] && res[0].title || 'OUTLET', | 240 | + activityTitle: res[0] && res[0].title || '奥莱', |
239 | saleType: 4 // 促销类型, 奥莱为4 | 241 | saleType: 4 // 促销类型, 奥莱为4 |
240 | }; | 242 | }; |
241 | }); | 243 | }); |
@@ -134,6 +134,11 @@ const _searchGoods = (params) => { | @@ -134,6 +134,11 @@ const _searchGoods = (params) => { | ||
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | + if (params.isblknew) { | ||
138 | + method = 'app.search.newProduct'; | ||
139 | + params.app_type = 1; | ||
140 | + } | ||
141 | + | ||
137 | return api.get('', _.assign({ | 142 | return api.get('', _.assign({ |
138 | method: method | 143 | method: method |
139 | }, params), { | 144 | }, params), { |
@@ -68,7 +68,7 @@ router.post('/detail/consultsubmit', auth, detail.consultsubmit); // 商å“å’¨è¯ | @@ -68,7 +68,7 @@ router.post('/detail/consultsubmit', auth, detail.consultsubmit); // 商å“å’¨è¯ | ||
68 | router.get('/detail/coupon.json', detail.brandCoupon); // 品牌券 | 68 | router.get('/detail/coupon.json', detail.brandCoupon); // 品牌券 |
69 | router.post('/detail/coupon/save.json', auth, detail.getCoupon); // 获得 品牌券 | 69 | router.post('/detail/coupon/save.json', auth, detail.getCoupon); // 获得 品牌券 |
70 | 70 | ||
71 | -router.get('/recom/maylike', recom.mayLike);// 你可能喜欢 | 71 | +router.get('/recom/maylike', recom.mayLike); // 你可能喜欢 |
72 | router.get('/recom/maylikekids', recom.mayLikeKids); // 潮童你可能喜欢 | 72 | router.get('/recom/maylikekids', recom.mayLikeKids); // 潮童你可能喜欢 |
73 | 73 | ||
74 | router.get('/seckillDetail/seckillData/:productskn', seckillDetail.getSeckillData); // 秒杀数据接口 | 74 | router.get('/seckillDetail/seckillData/:productskn', seckillDetail.getSeckillData); // 秒杀数据接口 |
@@ -145,7 +145,10 @@ router.get('/list/new', news.newGoods); // 兼容 PC 的链接 | @@ -145,7 +145,10 @@ router.get('/list/new', news.newGoods); // 兼容 PC 的链接 | ||
145 | router.get('/new/selectNewSale', news.selectNewSale); | 145 | router.get('/new/selectNewSale', news.selectNewSale); |
146 | router.get('/new/filter', news.filter); | 146 | router.get('/new/filter', news.filter); |
147 | 147 | ||
148 | -router.get('/newsale/hotrank', newsale.index);// 热销排行榜 | ||
149 | -router.get('/newsale/selectHotrank', newsale.selectHotrank);// 热销排行榜 | 148 | +// 新品到着(blk) |
149 | +router.get('/blknew', news.blkNewGoods); | ||
150 | + | ||
151 | +router.get('/newsale/hotrank', newsale.index); // 热销排行榜 | ||
152 | +router.get('/newsale/selectHotrank', newsale.selectHotrank); // 热销排行榜 | ||
150 | 153 | ||
151 | module.exports = router; | 154 | module.exports = router; |
1 | +{{#if isblknew}} | ||
2 | + <input class="query-param" type="hidden" data-attr="isblknew" value="{{isblknew}}"> | ||
3 | +{{/if}} | ||
4 | + | ||
1 | {{#if brand}} | 5 | {{#if brand}} |
2 | <input class="query-param" type="hidden" data-attr="brand" value="{{brand}}"> | 6 | <input class="query-param" type="hidden" data-attr="brand" value="{{brand}}"> |
3 | {{/if}} | 7 | {{/if}} |
-
Please register or login to post a comment