From ea801217a04fc16b2f2be8c8f0f06bbb93e5224f Mon Sep 17 00:00:00 2001 From: alsotang Date: Thu, 20 Nov 2014 22:58:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#459=20=E3=80=82=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E3=80=90=E7=B2=BE=E5=8D=8E=E3=80=91=E7=89=88=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.default.js | 3 ++- controllers/site.js | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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;