From 89927564d55fea5f7118463e553b0a407561a8ff Mon Sep 17 00:00:00 2001 From: junfengP <840282629@qq.com> Date: Sun, 12 May 2019 22:18:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=BC=AB=E7=94=BBDB?= =?UTF-8?q?=E7=9A=84ctx.state.data=E5=86=85link=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=20(#2112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/manhuadb/comics.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/manhuadb/comics.js b/lib/routes/manhuadb/comics.js index c0b3e302b2..25ea444d21 100644 --- a/lib/routes/manhuadb/comics.js +++ b/lib/routes/manhuadb/comics.js @@ -4,9 +4,10 @@ const cheerio = require('cheerio'); module.exports = async (ctx) => { const id = ctx.params.id; + const comicPage = host + `/manhua/${id}`; const response = await axios({ method: 'get', - url: host + `/manhua/${id}`, + url: comicPage, }); const data = response.data; const $ = cheerio.load(data); @@ -14,7 +15,7 @@ module.exports = async (ctx) => { const comicTitle = $('.comic-title').text(); ctx.state.data = { title: '漫画DB - ' + comicTitle, - link: host, + link: comicPage, description: '漫画DB', item: list .map((i, item) => ({