Authored by ccbikai

修改子app

... ... @@ -11,13 +11,13 @@ const helpers = global.yoho.helpers;
/**
* 频道选择页
*/
const channel = {
const component = {
index: (req, res, next) => {
res.render('index', {
module: 'channel',
module: 'component',
page: 'home'
});
}
};
module.exports = channel;
module.exports = component;
... ...
... ... @@ -8,10 +8,10 @@
const expressRouter = require('express').Router;
const cRoot = './controllers';
const channel = require(cRoot);
const component = require(cRoot);
const router = expressRouter();
router.get('/', channel.index); // 首页
router.get('/', component.index); // 首页
module.exports = router;
... ...
var Vue = require('yoho-vue');
var App = require('channel/home');
var App = require('component/home');
new Vue({
var vm = new Vue({
el: '#app',
components: {
app: App
}
});
console.log(2);
console.log(vm);
... ...