From 0fc6b4da61eab717772b51e03ac52480f09ec496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E7=B3=96=E7=8E=9B=E6=96=87=E6=9C=B5?= Date: Mon, 28 May 2018 22:49:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=A3=E6=9E=90=E5=8D=B3?= =?UTF-8?q?=E5=88=BB=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=B8=BB=E9=A2=98=E7=B1=BB=E6=B6=88=E6=81=AF?= =?UTF-8?q?=20(#227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朵爷 --- routes/jike/user.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/jike/user.js b/routes/jike/user.js index 377f5020c7..1ae3a9fc28 100644 --- a/routes/jike/user.js +++ b/routes/jike/user.js @@ -32,6 +32,7 @@ module.exports = async (ctx) => { REPOST: '转发', ANSWER: '回答', QUESTION: '提问', + PERSONAL_UPDATE: '创建新主题', }; const linkMap = { @@ -40,6 +41,7 @@ module.exports = async (ctx) => { REPOST: `https://web.okjike.com/post-detail/${item.id}/repost`, ANSWER: `https://m.okjike.com/answers/${item.id}`, QUESTION: `https://m.okjike.com/questions/${item.id}`, + PERSONAL_UPDATE: `https://web.okjike.com/topic/${item.topic && item.topic.id}/official`, }; let linkTemplate = ''; @@ -97,6 +99,9 @@ module.exports = async (ctx) => { content = `${content}${answerContent}`.replace(/\n|\r/g, '
'); } else if (item.type === 'QUESTION') { content = `在主题 ${item.topic.content} 提出了一个问题:

${content}`; + } else if (item.type === 'PERSONAL_UPDATE') { + shortenTitle = item.topic.content; + content = ` 主题简介:
${item.topic.briefIntro.replace(/(?:\r\n|\r|\n)/g, '
')}`; } return {