Authored by 沈志敏

blk新品到着 新页面

... ... @@ -13,6 +13,24 @@ const newModel = require(`${mRoot}/new`);
const _ = require('lodash');
const helpers = global.yoho.helpers;
// 新品到着(blk)
const blkNewGoods = (req, res) => {
let params = Object.assign({
isblknew: true
}, req.query);
res.render('search/goods-list', {
module: 'product',
page: 'search-list',
pageHeader: headerModel.setNav({
navTitle: req.query.title || req.query.sort_name || '新品抢先看'
}),
goodList: params,
showDownloadApp: true,
pageFooter: true
});
}
// 新品到着
const newGoods = (req, res, next) => {
let channel = req.cookies._Channel;
... ... @@ -72,7 +90,8 @@ let filter = (req, res, next) => {
module.exports = {
blkNewGoods,
newGoods,
selectNewSale,
filter
};
};
\ No newline at end of file
... ...
... ... @@ -132,6 +132,11 @@ const _searchGoods = (params) => {
}
}
if (params.isblknew) {
method = 'app.search.newProduct';
params.app_type = 1;
}
return api.get('', _.assign({
method: method
}, params), {
... ... @@ -293,4 +298,4 @@ module.exports = {
getSearchIndex,
getFuzzyDatas,
searchKeyActivity
};
};
\ No newline at end of file
... ...
... ... @@ -65,7 +65,7 @@ router.get('/detail/comments', detail.comments); // 商品评价
router.post('/detail/info', detail.getUser, detail.indexData); // 商品详情页-异步数据
router.post('/detail/consultsubmit', auth, detail.consultsubmit); // 商品咨询提交接口
router.get('/recom/maylike', recom.mayLike);// 你可能喜欢
router.get('/recom/maylike', recom.mayLike); // 你可能喜欢
router.get('/recom/maylikekids', recom.mayLikeKids); // 潮童你可能喜欢
router.get('/seckillDetail/seckillData/:productskn', seckillDetail.getSeckillData); // 秒杀数据接口
... ... @@ -97,7 +97,7 @@ router.get('/recommend-for-you/cart', recommendForYou.cart);
router.get('/seckill', seckill.checkAppVer('5.1.0'), seckill.index); // 秒杀列表页
router.get('/seckill/list', seckill.indexData);
router.post('/seckill/remind', seckill.remind); // only app; 秒杀提醒
router.post('/seckill/remind', seckill.remind); // only app; 秒杀提醒
router.get('/seckill/get-product-list', seckill.getProductList); // 秒杀列表根据活动id获取商品列表
// 搜索主页
... ... @@ -140,7 +140,10 @@ router.get('/list/new', news.newGoods); // 兼容 PC 的链接
router.get('/new/selectNewSale', news.selectNewSale);
router.get('/new/filter', news.filter);
router.get('/newsale/hotrank', newsale.index);// 热销排行榜
router.get('/newsale/selectHotrank', newsale.selectHotrank);// 热销排行榜
// 新品到着(blk)
router.get('/blknew', news.blkNewGoods);
module.exports = router;
router.get('/newsale/hotrank', newsale.index); // 热销排行榜
router.get('/newsale/selectHotrank', newsale.selectHotrank); // 热销排行榜
module.exports = router;
\ No newline at end of file
... ...
{{#if isblknew}}
<input class="query-param" type="hidden" data-attr="isblknew" value="{{isblknew}}">
{{/if}}
{{#if brand}}
<input class="query-param" type="hidden" data-attr="brand" value="{{brand}}">
{{/if}}
... ...