...
|
...
|
@@ -51,6 +51,39 @@ exports.index = (req, res, next) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 商品基本信息 SKN 进入
|
|
|
* @param {[type]} req [description]
|
|
|
* @param {[type]} res [description]
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.indexSkn = (req, res, next) => {
|
|
|
if (!req.params[0]) {
|
|
|
return next();
|
|
|
}
|
|
|
let uid = req.user.uid || 0;
|
|
|
let headerData = headerModel.setNav({
|
|
|
navTitle: '商品详情'
|
|
|
});
|
|
|
|
|
|
detailModel.getProductData({
|
|
|
productSkn: req.params[0],
|
|
|
uid: uid,
|
|
|
ua: req.get('user-agent') || ''
|
|
|
}).then((result) => {
|
|
|
if (_.isEmpty(result)) {
|
|
|
return next();
|
|
|
}
|
|
|
res.render('detail/detail', {
|
|
|
pageHeader: headerData,
|
|
|
result: result,
|
|
|
page: 'detail',
|
|
|
title: result.goodsName,
|
|
|
pageFooter: true
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 商品尺码信息详情
|
|
|
* @param {[type]} req [description]
|
|
|
* @param {[type]} res [description]
|
...
|
...
|
|