Authored by yyq

tpl

'use strict';
const mRoot = '../models';
const index = (req, res, next) => {
res.render('help/index', {});
};
module.exports = {
index
};
\ No newline at end of file
... ...
... ... @@ -5,8 +5,7 @@
*/
var express = require('express'),
path = require('path'),
hbs = require('express-handlebars');
path = require('path');
var app = express();
... ... @@ -18,12 +17,12 @@ app.on('mount', function(parent) {
Object.assign(app.locals, parent.locals);
});
app.set('views', path.join(__dirname, 'views/action'));
app.engine('.hbs', hbs({
app.use(global.yoho.hbs({
extname: '.hbs',
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: [path.join(__dirname, 'views/partial'), `${doraemon}/partial`],
partialsDir: [path.join(__dirname, 'views/partial')],
views: path.join(__dirname, 'views/action'),
helpers: global.yoho.helpers
}));
... ...
... ... @@ -7,8 +7,10 @@
'use strict';
const router = require('express').Router(); // eslint-disable-line
// const cRoot = './controllers';
const cRoot = './controllers';
// Your controller here
const help = require(`${cRoot}/index`);
router.get('/help', help.index);
module.exports = router;
... ...
... ... @@ -12,6 +12,7 @@ module.exports = app => {
// 业务模块
app.use(require('./apps/channel')); // 频道页
app.use(require('./apps/activity')); // 专题活动等活动页面
app.use(require('./apps/help')); // 帮助中心
app.use('/product', require('./apps/product')); // 商品相关页面
app.use(require('./apps/passport')); // 登录注册
app.use('/home', require('./apps/home')); // 会员中心
... ...