cate.js
761 Bytes
/**
* 分类页面
*/
'use strict';
const cateModel = require('../models/cate');
const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
const helpers = global.yoho.helpers;
let index = (req, res, next) => {
cateModel.getCateData(req.yoho.channel).then((result) => {
res.render('cate', {
module: 'channel',
page: 'cate',
title: '商品分类',
pageFooter: false,
category: {
nav: result.nav,
list: result.list,
searchUrl: helpers.urlFormat('/search', null, 'search')
},
showFooterTab: footerModel.getUrlData('category')
});
}).catch(next);
};
module.exports = {
index
};