Authored by zzzzzzz

Merge branch 'release/5.2' of git.yoho.cn:fe/yohobuywap-node into release/5.2

... ... @@ -130,7 +130,6 @@
{{#unless @root.wap.ucenter.removePrefer}}
{{> common/recommend-for-you}}
{{/unless}}
{{> common/suspend-cart}}
</div>
{{> footer-tab}}
... ...
... ... @@ -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;
... ... @@ -77,6 +95,7 @@ let filter = (req, res, next) => {
module.exports = {
blkNewGoods,
newGoods,
selectNewSale,
filter
... ...
... ... @@ -25,7 +25,7 @@ const willStartActivity = {
// 奥莱首页控制器
exports.index = (req, res, next) => {
let headerData = headerModel.setNav({
navTitle: 'OUTLET',
navTitle: '奥莱',
navBtn: false
});
... ... @@ -36,7 +36,7 @@ exports.index = (req, res, next) => {
outletModel.getContent(categoryId, yhChannel, contentcode).then(result => {
res.render('outlet', Object.assign({
pageHeader: headerData,
title: 'OUTLET | Yoho!Buy有货 | 潮流购物逛不停',
title: '奥莱 | Yoho!Buy有货 | 潮流购物逛不停',
}, result));
}).catch(next);
};
... ... @@ -67,7 +67,7 @@ exports.activityTime = (req, res, next) => {
// 奥莱活动频道列表页
exports.activityList = (req, res, next) => {
let headerData = headerModel.setNav({
navTitle: 'OUTLET',
navTitle: '奥莱',
navBtn: false
});
... ...
... ... @@ -15,7 +15,7 @@ const api = global.yoho.API;
const resourcesProcess = require(`${utils}/resources-process`);
const dateFormate = (str) =>{
const dateFormate = (str) => {
var time = new Date(str * 1000);
var y = time.getFullYear();
var m = time.getMonth() + 1;
... ... @@ -85,7 +85,9 @@ const _convertNavData = (list) => {
});
});
return {data: formatData};
return {
data: formatData
};
};
/**
... ... @@ -164,10 +166,10 @@ const _convertActicityData = (data) => {
const _getActivityDetail = (id) => {
var params = {
method: 'app.outlets.activityGet',
sort: 1, // 接口规定传1
sort: 1, // 接口规定传1
platform: 3, // h5平台代号
id: id,
type: 0 // 接口规定传0
type: 0 // 接口规定传0
};
... ... @@ -235,7 +237,7 @@ const getActivity = (id) => {
return {
activity: res,
productPool: res[0] && res[0].productPoolId || '',
activityTitle: res[0] && res[0].title || 'OUTLET',
activityTitle: res[0] && res[0].title || '奥莱',
saleType: 4 // 促销类型, 奥莱为4
};
});
... ...
... ... @@ -134,6 +134,11 @@ const _searchGoods = (params) => {
}
}
if (params.isblknew) {
method = 'app.search.newProduct';
params.app_type = 1;
}
return api.get('', _.assign({
method: method
}, params), {
... ...
... ... @@ -68,7 +68,7 @@ router.post('/detail/consultsubmit', auth, detail.consultsubmit); // 商å“å’¨è¯
router.get('/detail/coupon.json', detail.brandCoupon); // 品牌券
router.post('/detail/coupon/save.json', auth, detail.getCoupon); // 获得 品牌券
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); // 秒杀数据接口
... ... @@ -100,7 +100,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获取商品列表
// 搜索主页
... ... @@ -145,7 +145,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);
router.get('/newsale/hotrank', newsale.index); // 热销排行榜
router.get('/newsale/selectHotrank', newsale.selectHotrank); // 热销排行榜
module.exports = router;
... ...
{{#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}}
... ...