Authored by 徐炜

修复学生价不显示的问题

... ... @@ -1524,7 +1524,10 @@ let getNewProductAsyncData = (data) => {
}
params.is_student = data.isStudent ? 1 : 0;
params.current_vip_level = data.vipLevel;
if (!params.is_student) {
params.current_vip_level = data.vipLevel;
}
return api.get('', params, {
code: 200,
... ... @@ -1658,6 +1661,10 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
goodsPrice.previousPrice = origin.format_market_price;
}
if (origin.student_price) {
goodsPrice.studentPrice = origin.student_price;
}
dest.goodsPrice = goodsPrice;
if (origin.is_secKill) {
... ... @@ -1746,7 +1753,7 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
};
allSizeList[sizeName] = (allSizeList[sizeName] === null ||
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
typeof allSizeList[sizeName] === 'undefined') ? build : allSizeList[sizeName];
colorStorageNum += parseInt(size.storage_number, 10);
colorStorageGroup[value.product_skc][sizeName] = parseInt(size.storage_number, 10);
});
... ...
... ... @@ -4,8 +4,8 @@ const cookie = global.yoho.cookie;
module.exports = () => {
return (req, res, next) => {
// 从 SESSION 中获取到当前登录用户的 UID
if (req.session && _.isNumber(req.session._LOGIN_UID)) {
req.user.uid = req.session._LOGIN_UID;
if (req.session && _.isNumber(req.session.LOGIN_UID)) {
req.user.uid = req.session.LOGIN_UID;
}
// session 没有读取到的时候,从 cookie 读取 UID
... ...