fix: tencent news show author avatar (#17301)
This commit is contained in:
parent
6bfad6c0fb
commit
287b825b4f
|
|
@ -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<Data> {
|
||||
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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue