Skip to content

Let's use AI to Earn!

feat: 一键AI评论

yikaJasonMicaa0d832ba00c
diff --git a/electron/main/reply/service.ts b/electron/main/reply/service.ts
index 3e83d1ec..621e3033 100644
--- a/electron/main/reply/service.ts
+++ b/electron/main/reply/service.ts
@@ -56,8 +56,6 @@ export class ReplyService {
status: 0,
});
- for (const item of list) list.push(item);
-
if (list.length === 0) {
scheduleEvent({
tag: AutorReplyCommentScheduleEvent.End,
diff --git a/electron/plat/douyin/index.ts b/electron/plat/douyin/index.ts
index 27da4a4c..79d3431f 100644
--- a/electron/plat/douyin/index.ts
+++ b/electron/plat/douyin/index.ts
@@ -2323,12 +2323,6 @@ export class DouyinService {
count: 10,
},
) {
- const cookieString = CommonUtils.convertCookieToJson(cookie);
- const csrfToken = await this.getSecsdkCsrfToken(cookieString);
-
- console.log('----- comment_id', comment_id);
- console.log('----- pageInfo', pageInfo);
-
const res = await requestNet<DouyinCreatorCommentListResponse>({
url: CommonUtils.buildUrl(
`https://creator.douyin.com/aweme/v1/creator/comment/reply/list/`, // msToken=xxx
@@ -2339,8 +2333,7 @@ export class DouyinService {
},
),
headers: {
- cookie: cookieString,
- 'X-Secsdk-Csrf-Token': csrfToken,
+ cookie: CookieToString(cookie),
},
method: 'GET',
});
diff --git a/src/views/reply/index.tsx b/src/views/reply/index.tsx
index 7c45f47a..49e3bcb5 100644
--- a/src/views/reply/index.tsx
+++ b/src/views/reply/index.tsx
@@ -1,7 +1,7 @@
/*
* @Author: nevin
* @Date: 2025-02-10 22:20:15
- * @LastEditTime: 2025-03-23 21:52:31
+ * @LastEditTime: 2025-03-23 23:02:47
* @LastEditors: nevin
* @Description: 评论页面 reply
*/
@@ -32,10 +32,19 @@ export default function Page() {
// 注册监听
(() => {
- window.ipcRenderer.on(SendChannelEnum.CommentRelyProgress, (e, args) => {
- message.info('收到评论通知');
- console.log('--------- args', args);
- });
+ window.ipcRenderer.on(
+ SendChannelEnum.CommentRelyProgress,
+ (
+ e,
+ args: {
+ tag: string;
+ status: -1 | 0 | 1;
+ error?: any;
+ },
+ ) => {
+ message.info(`收到评论通知--${args.status}---${args.tag}`);
+ },
+ );
})();
async function getCreatorList() {