diff --git a/config.default.js b/config.default.js index de90853..3fbdf04 100644 --- a/config.default.js +++ b/config.default.js @@ -107,7 +107,8 @@ var config = { tabs: [ ['share', '分享'], ['ask', '问答'], - ['job', '招聘'] + ['job', '招聘'], + ['good', '精华'], ] }; diff --git a/controllers/site.js b/controllers/site.js index 78be1a1..3fdcc6c 100644 --- a/controllers/site.js +++ b/controllers/site.js @@ -56,7 +56,11 @@ exports.index = function (req, res, next) { // 取主题 var query = {}; if (tab && tab !== 'all') { - query.tab = tab; + if (tab === 'good') { + query.good = true; + } else { + query.tab = tab; + } } var limit = config.list_topic_count;