const detailModel = require('../models/detail'); // detail model
const headerModel = require('../../../doraemon/models/header'); // 头部model

const cover = (req, res, next) => {
    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
};