Authored by ccbikai

修改子app

@@ -11,13 +11,13 @@ const helpers = global.yoho.helpers; @@ -11,13 +11,13 @@ const helpers = global.yoho.helpers;
11 /** 11 /**
12 * 频道选择页 12 * 频道选择页
13 */ 13 */
14 -const channel = { 14 +const component = {
15 index: (req, res, next) => { 15 index: (req, res, next) => {
16 res.render('index', { 16 res.render('index', {
17 - module: 'channel', 17 + module: 'component',
18 page: 'home' 18 page: 'home'
19 }); 19 });
20 } 20 }
21 }; 21 };
22 22
23 -module.exports = channel; 23 +module.exports = component;
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 8
9 const expressRouter = require('express').Router; 9 const expressRouter = require('express').Router;
10 const cRoot = './controllers'; 10 const cRoot = './controllers';
11 -const channel = require(cRoot); 11 +const component = require(cRoot);
12 12
13 const router = expressRouter(); 13 const router = expressRouter();
14 14
15 -router.get('/', channel.index); // 首页 15 +router.get('/', component.index); // 首页
16 16
17 module.exports = router; 17 module.exports = router;
1 var Vue = require('yoho-vue'); 1 var Vue = require('yoho-vue');
2 2
3 -var App = require('channel/home'); 3 +var App = require('component/home');
4 4
5 -new Vue({ 5 +var vm = new Vue({
6 el: '#app', 6 el: '#app',
7 components: { 7 components: {
8 app: App 8 app: App
9 } 9 }
10 }); 10 });
11 11
12 -console.log(2); 12 +console.log(vm);