Default Templates


exports.courses = function(req, res) {

    uId = req.params.uId;

    user = {

        id: uId,

        name: '陈磊'

    };

    var type= 'courses';

    res.render('u/courses', { user: user, type: type });

};


exports.plans = function(req, res) {

    var list = [{

    program_id: 32,

    program_title: 'Web前端工程师',

    program_label: ['前端', '求职', '实战'],

    program_cur_course: 95

    }];

    var type= 'plans';

    res.render('u/plans', { list: list, type: type});

};


exports.bbs = function(req, res) {

    var type= 'bbs';

    res.render('u/bbs', { title: 'Users', type: type });

};


exports.articles = function(req, res) {

    var type= 'articles';

    res.render('u/articles', { title: 'Users', type: type });

};


exports.wiki = function(req, res) {

    var type= 'wiki';

    var list = [{

        program_id: 47,

        program_status: '审核中',

        program_bd: 'html',

        program_title_detail: 'html词条',

        program_pass_time: '20分钟'

    }];

    res.render('u/wiki', { list: list, type: type });

};


exports.notices = function(req, res) {

    uId = req.params.uId;

    user = {

        id: uId,

        name: 'admin'

    };

    var list = [{

        notices_author:'admin',

        notices_content:'通知内容',

        notices_time:'2016-03-29'

    },{

        notices_author:'admin',

        notices_content:'通知内容',

        notices_time:'2016-03-29'

    },{

        notices_author:'admin',

        notices_content:'通知内容',

        notices_time:'2016-03-29'

    }];

    var type= 'notices';

    res.render('u/notices', { user: user, type: type ,list: list});

};


exports.messages = function(req, res) {

    uId = req.params.uId;

    user = {

        id: uId,

        name: 'admin'

    };

    var type= 'msg';

    res.render('u/messages',{ user: user, type: type });

}



qq_李邵逸马_03116231
浏览 1341回答 1
1回答

习惯受伤

nodejs的代码怎么出现在c#标签之下?并且没有问题说明
打开App,查看更多内容
随时随地看视频慕课网APP