fix(route): 书趣阁域名切换后访问失败 (#7734)

This commit is contained in:
Ving 2021-06-27 08:01:02 +08:00 committed by GitHub
parent f85a40d4ad
commit 70da5d32ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,7 @@ const got = require('@/utils/got');
const cheerio = require('cheerio');
const iconv = require('iconv-lite');
const baseUrl = 'http://www.shuquge.com/txt/';
const baseUrl = 'http://www.sizhicn.com/txt/';
// 获取小说的最新章节列表
module.exports = async (ctx) => {
const id = ctx.params.id; // 小说id
@ -10,7 +10,6 @@ module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: `${baseUrl}${id}/index.html`,
// responseEncoding: 'gbk', //该配置项在 0.18版本中没有打包进去
responseType: 'buffer',
});
const responseHtml = iconv.decode(response.data, 'utf-8');