detail.js
616 Bytes
const detailModel = require('../models/detail'); // detail model
const headerModel = require('../../../doraemon/models/header'); // 头部model
const cover = (req, res, next) => {
console.log(req.params);
req.ctx(detailModel).getMagazineInfo(req.params).then(result => {
res.render('cover/index', {
pageHeader: headerModel.setNav({
navTitle: false,
navBtn: false
}),
module: 'magazine',
page: 'detail',
localCss: true,
result
});
}).catch(next);
};
module.exports = {
cover
};