Authored by zhangxiaoru

和有货币部分调整

... ... @@ -18,8 +18,8 @@
{{! 你可能喜欢}}
{{#if lifestyleHomePage}}
{{> channel/maybe-like-lifestyle}}
{{!-- {{else}}
{{> channel/maybe-like}} --}}
{{else}}
{{> channel/maybe-like}}
{{/if}}
{{! 底部banner}}
... ...
... ... @@ -2,6 +2,12 @@
const mayLikeModel = require('../models/recom');
let yhChannel = {
boys: 1,
girl: 2,
kids: 3
};
/**
* 你可能喜欢的BOYS或GIRLS的商品列表
*/
... ... @@ -12,10 +18,9 @@ const mayLike = (req, res, next) => {
let limit = 50;
let gender = req.query.gender;
let udid = req.sessionID || 'yoho';
let recPos = 100009;
let channel = req.query.channel || 1;
let recPos = req.query.rec_pos || 100001;
let channel = req.cookies._Channel && yhChannel[req.cookies._Channel] || 1;
if (channel === 1 || channel === 2) {
return mayLikeModel.mayLike(uid, page, limit, gender, udid, recPos, channel).then((result) => {
res.render('recom/maybe-like', Object.assign({
... ... @@ -23,16 +28,6 @@ const mayLike = (req, res, next) => {
goods: result
}, result));
}).catch(next);
}
recPos = 100001;
mayLikeModel.mayLike(uid, page, limit, gender, udid, recPos, channel).then((result) => {
res.render('recom/maybe-like', {
layout: false,
goods: result
});
}).catch(next);
};
/**
... ...
... ... @@ -76,7 +76,7 @@ const mayLikelife = (page, limit, channel) => {
build.show = true;
build.goods = productProcess.processProductList(result.data.product_list.top);
build.goods = productProcess.processProductList(result.data.product_list.top, {showTags: false});
formData.goodsContainer.push(build);
}
... ... @@ -86,7 +86,7 @@ const mayLikelife = (page, limit, channel) => {
build.show = true;
build.goods = productProcess.processProductList(result.data.product_list.new);
build.goods = productProcess.processProductList(result.data.product_list.new, {showTags: false});
formData.goodsContainer.push(build);
}
... ...