...
|
...
|
@@ -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
|
|
|
}; |
...
|
...
|
|