From 9456ffefd6444905703253919f8221b3b81c04f8 Mon Sep 17 00:00:00 2001 From: AgFlore Date: Wed, 19 Aug 2020 04:14:46 +0800 Subject: [PATCH] fix: new domain for popiask (#5418) --- assets/radar-rules.js | 2 +- lib/routes/popiask/questions.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/radar-rules.js b/assets/radar-rules.js index 455bebe9c9..ba67da2896 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -2177,7 +2177,7 @@ }, ], }, - 'popiask.cn': { + 'popiapp.cn': { _name: 'Popi 提问箱', www: [ { diff --git a/lib/routes/popiask/questions.js b/lib/routes/popiask/questions.js index 754c2daa96..a51f3e4813 100644 --- a/lib/routes/popiask/questions.js +++ b/lib/routes/popiask/questions.js @@ -6,9 +6,9 @@ module.exports = async (ctx) => { const getUserInfo = await got({ method: 'get', - url: `https://apiv3.popiask.cn/unuser/user/${sharecode}`, + url: `https://apiv3.popiapp.cn/unuser/user/${sharecode}`, headers: { - Referer: `https://www.popiask.cn/${sharecode}`, + Referer: `https://www.popiapp.cn/${sharecode}`, }, }); @@ -18,9 +18,9 @@ module.exports = async (ctx) => { const getQuestionFromUser = await got({ method: 'get', - url: `https://apiv3.popiask.cn/unuser/getQuestionFromUser/${sharecode}?pageSize=${pagesize}`, + url: `https://apiv3.popiapp.cn/unuser/getQuestionFromUser/${sharecode}?pageSize=${pagesize}`, headers: { - Referer: `https://www.popiask.cn/${sharecode}`, + Referer: `https://www.popiapp.cn/${sharecode}`, }, }); @@ -28,14 +28,14 @@ module.exports = async (ctx) => { ctx.state.data = { title: `${nickname} 的 popiask 提问箱`, - link: `https://www.popiask.cn/${sharecode}`, + link: `https://www.popiapp.cn/${sharecode}`, description: `${production} ${description}`, item: data.map((item) => ({ title: item.title, description: `${item.title}
(${item.created_at})

答:
${item.answer.txt_content}
(${new Date(item.answer_at * 1000).toLocaleString()})`, guid: item.answer_at, pubDate: new Date(item.answer_at * 1000).toUTCString(), - link: `https://www.popiask.cn/answered.html?sharecode=${sharecode}&dynamicId=${item.visit_code}`, + link: `https://www.popiapp.cn/answered.html?sharecode=${sharecode}&dynamicId=${item.visit_code}`, })), }; };