Authored by 沈志敏

fix bug

... ... @@ -45,6 +45,7 @@ const list = (req, res, next) => {
list: result[0].list,
filter: result[0].filter,
pageFooter: true,
localCss: true
});
}).catch(next);
};
... ... @@ -66,11 +67,31 @@ const search = (req, res, next) => {
}).catch(next);
};
const detail = (req, res, next) => {
let skn = req.params[0];
let params = {
product_skn: skn,
uid: req.user.uid || 0,
client_type: 'iphone' // todo
};
model.detail(params).then((result) => {
res.render('global/detail', {
module: 'product',
page: 'global-detail',
pageHeader: headerModel.setNav({
navTitle: '商品详情'
}),
result: result,
pageFooter: true,
localCss: true
});
}).catch(next);
};
module.exports = {
list,
search,
detail: function() {
},
detail
};
... ...
... ... @@ -33,3 +33,9 @@ exports.getBrand = (param) => {
return data.data || {};
});
};
exports.detail = (param) => {
return globalapi.get('product/api/v2/detail/get', param).then((data) => {
return data.data || {};
});
};
... ...
@import "common/good";
@import "common/filter";
@import "list";
... ...