fix(route): optimize url of 新快报 (#12302)

* opt(route): optimize url of 新快报

* fix(route): fix default channel of 新快报
This commit is contained in:
Tim Wu 2023-04-14 00:13:08 +08:00 committed by GitHub
parent 6b13de1433
commit 0d60360cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const { art } = require('@/utils/render');
const path = require('path');
module.exports = async (ctx) => {
const channel = ctx.params.channel ?? 1;
const channel = ctx.params.channel ?? 350;
const currentUrl = `https://www.xkb.com.cn/xkbapp/fundapi/article/api/articles?chnlId=${channel}&visibility=1&page=0&size=20&keyword=`;
const { data: response } = await got({
@ -24,7 +24,7 @@ module.exports = async (ctx) => {
thumb: item.shareImg,
}),
pubDate: timezone(parseDate(item.operTime), +8),
link: 'https://www.xkb.com.cn/#/detail?id=' + item.id,
link: 'https://www.xkb.com.cn/detail?id=' + item.id,
contentUrl: item.contentUrl,
author: item.metaInfo.author,
chnlName: item.metaInfo.chnlName,
@ -48,7 +48,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `新快报新快网 - ${chnlName}`,
link: `https://www.xkb.com.cn/#/home?id=${channel}`,
link: `https://www.xkb.com.cn/home?id=${channel}`,
item: items,
};
};