Authored by lijing

秒杀详情页

... ... @@ -117,9 +117,27 @@ const getProductList = (req, res, next) => {
*/
const detail = (req, res, next) => {
return seckillModel.queryDetail().then((result) => {
let headerData = headerModel.setNav({
navTitle: '商品详情'
});
let responseData = {
pageHeader: headerData,
module: 'product',
page: 'detail',
title: '商品详情 | Yoho!Buy有货 | 潮流购物逛不停',
//pageFooter: true
};
let params = {
uid: req.query.uid || 11084019,
productSkn: req.query.product_skn || 51178553,
productId: req.query.product_id || 321819
}
res.render('detail/detail', result);
return seckillModel.queryDetail(params).then((result) => {
console.log(result.data);
res.render('detail/detail', Object.assign(responseData, result));
});
};
... ...
... ... @@ -37,9 +37,12 @@ const queryProductList = (activityId) => {
/**
* 详情页
*/
const queryDetail = () => {
const queryDetail = (params) => {
return api.get('', {
method: 'app.product.data'
method: 'app.product.data',
uid: params.uid,
product_skn: params.productSkn,
product_id: params.productId
}, {
cache: true
});
... ...