From 287b825b4fd48f75be8285d30484551bcafb1bc0 Mon Sep 17 00:00:00 2001 From: huanfei <41602338+huanfe1@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:04:54 +0800 Subject: [PATCH] fix: tencent news show author avatar (#17301) --- lib/routes/tencent/news/author.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/routes/tencent/news/author.ts b/lib/routes/tencent/news/author.ts index b36f801013b2a4..49b4b0abf4e25c 100644 --- a/lib/routes/tencent/news/author.ts +++ b/lib/routes/tencent/news/author.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, Data } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -25,15 +25,16 @@ export const route: Route = { }, radar: [ { - source: ['new.qq.com/omn/author/:mid'], + title: '当前作者文章', + source: ['news.qq.com/omn/author/:mid'], }, ], - name: '更新', + name: '作者', maintainers: ['LogicJake', 'miles170'], handler, }; -async function handler(ctx) { +async function handler(ctx): Promise { const mid = ctx.req.param('mid'); const userType = /^\d+$/.test(mid) ? 'chlid' : 'guestSuid'; const homePageInfoUrl = `https://i.news.qq.com/i/getUserHomepageInfo?${userType}=${mid}`; @@ -99,5 +100,6 @@ async function handler(ctx) { description, link: `https://new.qq.com/omn/author/${mid}`, item: items, + image: userInfo?.shareImg, }; }