Authored by 郭成尧

'homeHeader'

... ... @@ -6,6 +6,7 @@
'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const indexModel = require('../models/index');
exports.index = (req, res, next) => {
... ... @@ -13,12 +14,18 @@ exports.index = (req, res, next) => {
uid: req.user.uid || '6228593'
};
let headerData = headerModel.setNav({
navTitle: '个人中心'
});
indexModel.index(params).then(result => {
result.isLogin = true;
if (result) {
console.log(result);
res.render('index', result);
res.render('index', Object.assign(result, {
pageHeader: headerData,
pageFooter: true
}));
}
}).catch(next);
... ...