Authored by 郝肖肖

为您优选,uid传入

... ... @@ -59,6 +59,10 @@ const getRecommendProduct = (req, res, next) => {
udid: getUdid(req, res)
};
if (req.user.uid) {
params.uid = req.user.uid;
}
recommend.getRecommendProduct(params).then((result) => {
res.json(result);
}).catch(next);
... ...
... ... @@ -50,11 +50,7 @@ const _processProduct = (list) => {
return newRes;
};
const getRecommendProduct = (params, uid) => {
if (uid !== 0 && uid !== null) {
params.uid = uid;
}
const getRecommendProduct = (params) => {
return api.get('', _.assign({
method: 'app.home.newPreference',
limit: 20,
... ...