Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
快手可以搜
DESKTOP-ZTS2NQJNA0b62785ebd26
diff --git a/electron/main/plat/platforms/Kwai/index.ts b/electron/main/plat/platforms/Kwai/index.tsindex b4c23221..232b5266 100644--- a/electron/main/plat/platforms/Kwai/index.ts+++ b/electron/main/plat/platforms/Kwai/index.ts@@ -209,34 +209,61 @@ export class Kwai extends PlatformBase {pcursor?: string,): Promise<{list: WorkData[];+ orgList: any[];pageInfo: ResponsePageInfo;}> {- throw '';- // const cookie: CookiesType = JSON.parse(account.loginCookie);- // const res = await kwaiPub.getsearchNodeList(cookie, pcursor);- // console.log('----------- getsearchNodeList --- res: ', res.data);- // const photoList = res.data.data?.visionSearchPhoto.feeds || [];- // console.log('----------- getsearchNodeList --- photoList: ', photoList[0]);- // // const list: WorkData[] = photoList.map((v) => {- // // return {- // // dataId: v.photo.id,- // // readCount: v.photo.viewCount,- // // likeCount: v.photo.likeCount,- // // commentCount: v.photo.commentCount,- // // title: v.photo.caption,- // // coverUrl: v.photo.coverUrl,- // // };- // // });- //- // return {- // list: [],- // pageInfo: {},- // // {- // // hasMore: !!res.data.data.result,- // // count: res.data.data.totalCount || '',- // // pcursor: res.data.data.pcursor + '',- // // },- // };++ const cookie: CookiesType = JSON.parse(account.loginCookie);+ const res = await kwaiPub.getsearchNodeList(cookie, pcursor);+ console.log('----------- getsearchNodeList --- res: ', res.data);+ const photoList = res.data.data?.visionSearchPhoto.feeds || [];+ console.log('----------- getsearchNodeList --- photoList: ', photoList[0]);+ // const list: WorkData[] = photoList.map((v) => {+ // return {+ // dataId: v.photo.id,+ // readCount: v.photo.viewCount,+ // likeCount: v.photo.likeCount,+ // commentCount: v.photo.commentCount,+ // title: v.photo.caption,+ // coverUrl: v.photo.coverUrl,+ // };+ // });+ const list: WorkData[] = [];+ for (const s of photoList) {+ list.push({+ dataId: s.llsid,+ readCount: s.photo.viewCount,+ likeCount: s.photo.likeCount,+ collectCount: s.photo.collectCount,+ commentCount: s.photo.commentCount,+ title: s.photo.caption,+ coverUrl: s.photo.coverUrl,+ option: {+ xsec_token: s.xsec_token || '',+ },+ author: {+ name: s.author?.name,+ id: s.author?.id,+ avatar: s.author?.headerUrl,+ },+ data: s,+ });+ }++ return {+ list: list,+ orgList: res.data.data,+ pageInfo: {+ hasMore: false,+ count: 0,+ pcursor: '',+ },+ // {+ // hasMore: !!res.data.data.result,+ // count: res.data.data.totalCount || '',+ // pcursor: res.data.data.pcursor + '',+ // },+ };}/**diff --git a/electron/plat/Kwai/index.ts b/electron/plat/Kwai/index.tsindex 39845464..537f4413 100644--- a/electron/plat/Kwai/index.ts+++ b/electron/plat/Kwai/index.ts@@ -373,7 +373,7 @@ class KwaiPub {body: {operationName: 'visionSearchPhoto',variables: {- keyword: '牛le',+ keyword: '英雄杀道一',pcursor: '',page: 'search',},diff --git a/src/views/replyother/index.tsx b/src/views/replyother/index.tsxindex e7376630..4dfe7f04 100644--- a/src/views/replyother/index.tsx+++ b/src/views/replyother/index.tsx@@ -158,13 +158,15 @@ export default function Page() {// 加载更多帖子const loadMorePosts = async () => {- if (!pageInfo.hasMore || isLoadingMore ) return;+ if (!pageInfo.hasMore || isLoadingMore || !searchKeyword || searchKeyword == '') return;if(!postFirstId || postFirstId == '') return;setIsLoadingMore(true);try {- await getSearchListFunc(activeAccountId, searchKeyword);+ setTimeout(async () => {+ await getSearchListFunc(activeAccountId, searchKeyword);+ }, 0);} finally {setIsLoadingMore(false);}