Authored by xuqi

初始化tag页面

@@ -3,9 +3,12 @@ @@ -3,9 +3,12 @@
3 * @author: xuqi(qi.xu@yoho.cn) 3 * @author: xuqi(qi.xu@yoho.cn)
4 * @date: 2015/3/27 4 * @date: 2015/3/27
5 */ 5 */
6 -var detail = require('./views/controller/detail'); 6 +var detail = require('./views/controller/detail'),
  7 + tag = require('./views/controller/tag');
7 8
8 module.exports = function(app) { 9 module.exports = function(app) {
9 app.get('/', detail.show); 10 app.get('/', detail.show);
10 - app.get('/optimize', detail.optimize) 11 + app.get('/optimize', detail.optimize);
  12 +
  13 + app.get('/tag', tag.show);
11 }; 14 };
  1 +/**
  2 + * tag页控制器文件
  3 + * @author: xuqi(qi.xu@yoho.cn)
  4 + * @date: 2015/4/9
  5 + */
  6 +var data = require('../../public/js/data.js')();
  7 +
  8 +exports.show = function(req, res) {
  9 + res.render('tag/tag', {
  10 + detail: data,
  11 + layout: '../layouts/layout',
  12 + css: '../css/tag.css'
  13 + });
  14 +};