Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
style: 类型报错
yikaJasonMicab2fae56de08
diff --git a/electron/main/plat/platforms/Kwai/index.ts b/electron/main/plat/platforms/Kwai/index.tsindex 999767e3..6d6f3336 100644--- a/electron/main/plat/platforms/Kwai/index.ts+++ b/electron/main/plat/platforms/Kwai/index.ts@@ -1,7 +1,7 @@/** @Author: nevin* @Date: 2025-02-19 17:54:53- * @LastEditTime: 2025-03-24 15:16:34+ * @LastEditTime: 2025-03-24 23:34:45* @LastEditors: nevin* @Description:*/@@ -269,6 +269,26 @@ export class Kwai extends PlatformBase {};}+ async createCommentByOther(+ account: AccountModel,+ dataId: string, // 作品ID+ content: string,+ ) {+ return null;+ }++ async replyCommentByOther(+ account: AccountModel,+ commentId: string,+ content: string,+ option: {+ dataId?: string; // 作品ID+ comment: any; // 辅助数据,原数据+ },+ ) {+ return null;+ }+async createComment(account: AccountModel,dataId: string, // 作品IDdiff --git a/electron/main/plat/platforms/douyin/index.ts b/electron/main/plat/platforms/douyin/index.tsindex 31d1ecfa..d12abe37 100644--- a/electron/main/plat/platforms/douyin/index.ts+++ b/electron/main/plat/platforms/douyin/index.ts@@ -1,7 +1,7 @@/** @Author: nevin* @Date: 2025-02-08 11:40:45- * @LastEditTime: 2025-03-24 15:13:56+ * @LastEditTime: 2025-03-24 23:32:58* @LastEditors: nevin* @Description: 抖音*/@@ -246,7 +246,6 @@ export class Douyin extends PlatformBase {};}-// 其他人作品评论列表async getCreatorCommentListByOther(account: AccountModel,@@ -293,9 +292,6 @@ export class Douyin extends PlatformBase {};}---async createCommentByOther(account: AccountModel,dataId: string, // 作品ID@@ -310,38 +306,18 @@ export class Douyin extends PlatformBase {// return res.status === 200 && res.data.status_code === 0;-const cookie: CookiesType = JSON.parse(account.loginCookie);const res = await douyinService.creatorCommentReplyOther(cookie, {aweme_id: dataId,text: content,- one_level_comment_rank: -1+ one_level_comment_rank: -1,});console.log('------ res', res);return res;-}--- async createComment(- account: AccountModel,- dataId: string, // 作品ID- content: string,- ) {- const cookie: CookiesType = JSON.parse(account.loginCookie);- const res = await douyinService.creatorCommentReply(cookie, {- comment_Id: '',- item_id: dataId,- text: content,- });-- return res.status === 200 && res.data.status_code === 0;- }--async replyCommentByOther(account: AccountModel,commentId: string,@@ -358,7 +334,7 @@ export class Douyin extends PlatformBase {aweme_id: option.dataId || '',reply_id: commentId,text: content,- one_level_comment_rank: 1+ one_level_comment_rank: 1,});console.log('------ res', res);@@ -366,6 +342,20 @@ export class Douyin extends PlatformBase {return res;}+ async createComment(+ account: AccountModel,+ dataId: string, // 作品ID+ content: string,+ ) {+ const cookie: CookiesType = JSON.parse(account.loginCookie);+ const res = await douyinService.creatorCommentReply(cookie, {+ comment_Id: '',+ item_id: dataId,+ text: content,+ });++ return res.status === 200 && res.data.status_code === 0;+ }async replyComment(account: AccountModel,diff --git a/electron/main/plat/platforms/wxSph/index.ts b/electron/main/plat/platforms/wxSph/index.tsindex b96577bb..ae994c57 100644--- a/electron/main/plat/platforms/wxSph/index.ts+++ b/electron/main/plat/platforms/wxSph/index.ts@@ -1,7 +1,7 @@/** @Author: nevin* @Date: 2025-02-08 11:40:45- * @LastEditTime: 2025-03-24 15:16:52+ * @LastEditTime: 2025-03-24 23:35:03* @LastEditors: nevin* @Description: 微信视频号*/@@ -233,6 +233,26 @@ export class WxSph extends PlatformBase {};}+ async createCommentByOther(+ account: AccountModel,+ dataId: string, // 作品ID+ content: string,+ ) {+ return null;+ }++ async replyCommentByOther(+ account: AccountModel,+ commentId: string,+ content: string,+ option: {+ dataId?: string; // 作品ID+ comment: any; // 辅助数据,原数据+ },+ ) {+ return null;+ }+async createComment(account: AccountModel,dataId: string, // 作品IDdiff --git a/electron/main/plat/platforms/xhs/index.ts b/electron/main/plat/platforms/xhs/index.tsindex 21ba844f..4ebae4ab 100644--- a/electron/main/plat/platforms/xhs/index.ts+++ b/electron/main/plat/platforms/xhs/index.ts@@ -1,7 +1,7 @@/** @Author: nevin* @Date: 2025-02-08 11:40:45- * @LastEditTime: 2025-03-24 15:17:03+ * @LastEditTime: 2025-03-24 23:35:16* @LastEditors: nevin* @Description: 小红书*/@@ -242,6 +242,26 @@ export class Xhs extends PlatformBase {};}+ async createCommentByOther(+ account: AccountModel,+ dataId: string, // 作品ID+ content: string,+ ) {+ return null;+ }++ async replyCommentByOther(+ account: AccountModel,+ commentId: string,+ content: string,+ option: {+ dataId?: string; // 作品ID+ comment: any; // 辅助数据,原数据+ },+ ) {+ return null;+ }+async createComment(account: AccountModel,dataId: string, // 作品IDdiff --git a/src/views/replyother/components/replyComment.tsx b/src/views/replyother/components/replyComment.tsxindex 8e1e3dd0..46f8548e 100644--- a/src/views/replyother/components/replyComment.tsx+++ b/src/views/replyother/components/replyComment.tsx@@ -1,5 +1,5 @@import { toolsApi } from '@/api/tools';-import { CommentData, icpReplyComment, icpReplyCommentByOther } from '@/icp/replyother';+import { CommentData, icpReplyCommentByOther } from '@/icp/replyother';import { Button, Form, Input, message, Modal } from 'antd';import { forwardRef, useImperativeHandle, useState } from 'react';@@ -34,7 +34,7 @@ const Com = forwardRef<ReplyCommentRef>((props: any, ref) => {* 回复评论*/async function replyComment(content: string) {- const res = await icpReplyCommentByOther(+ const res: any = await icpReplyCommentByOther(accountId,commentData!.commentId,content,