Authored by zhangxiaoru

plustar

... ... @@ -8,18 +8,19 @@
const mRoot = '../models';
const plustarModel = require(`${mRoot}/plustar`);
const headerModel = require('../../../doraemon/models/header'); // 头部model
// let channels = {
// boys: 1,
// girl: 2,
// kids: 3,
// lifestyle: 4
// };
let channels = {
boys: 1,
girl: 2,
kids: 3,
lifestyle: 4
};
const getListData = (req, res, next) => {
let gender = req.query.gender || req.cookies._Channel && channels[req.cookies._Channel] || 1;
let recom = '4';
let all = '1';
//console.log(gender);
// console.log(gender);
plustarModel.getListData(gender, recom, all).then((result) => {
... ... @@ -32,11 +33,11 @@ const getListData = (req, res, next) => {
ps: {
sName: '设计师',
pName: '经典潮牌'
}
}
});
}).catch(next);
};
module.exports = {
getListData
};
\ No newline at end of file
};
... ...
... ... @@ -6,13 +6,13 @@ const productProcess = require('../../../utils/product-process');
const getContentData = (gender, type) => {
return serviceAPI.get('guang/api/v3/plustar/getlist', {
gender: gender,
brand_type: type
}).then((result) => {
if (result && result.code === 200) {
//console.log(result)
// console.log(result)
return result;
} else {
logger.error('列表 list data return code is not 200');
... ... @@ -27,10 +27,10 @@ const getListData = (gender, recom, all) => {
star: result[0],
plus: result[1]
};
});
});
};
module.exports = {
getListData,
getContentData
};
\ No newline at end of file
};
... ...
... ... @@ -39,6 +39,6 @@ router.post('/opt/praiseArticle', opt.praiseArticle); // 资讯文章点赞 (H5
router.get('/info/index', info.index); // 逛详情页
router.get('/plustar', plustar.getListData); //国际优选
router.get('/plustar', plustar.getListData); // 国际优选
module.exports = router;
... ...