Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
评论正式去掉测试评论 正式用api和设定
daoyianb87c765cb7ab
diff --git a/electron/main/interaction/service.ts b/electron/main/interaction/service.tsindex 77ed048e..d41f3a5d 100644--- a/electron/main/interaction/service.ts+++ b/electron/main/interaction/service.ts@@ -194,6 +194,15 @@ export class InteractionService {option.commentContent,works.author?.id,);++ if (option.commentContent.includes(',')) {+ let randomIndex = Math.floor(Math.random() * option.commentContent.split(',').length);+ option.commentContent = option.commentContent.split(',')[randomIndex];+ }++ console.log('------ option.commentContent', option.commentContent);++const commentWorksRes = await platController.createCommentByOther(account,works.dataId,diff --git a/src/views/replyother/replyother.tsx b/src/views/replyother/replyother.tsxindex fa4ddd24..a8ffe252 100644--- a/src/views/replyother/replyother.tsx+++ b/src/views/replyother/replyother.tsx@@ -291,6 +291,8 @@ export default function Page() {setTaskModalVisible(false);setIsSelectMode(false);+ // return;+forEach(postList, (postId) => {const post = postList.find((item) => item.dataId === postId);if (!post) return;@@ -308,14 +310,23 @@ export default function Page() {// 调用icpCreateInteractionOneKey函数+ let option:any = {+ platform: activeAccountType,+ ...values,+ }+ if (values.commentType != 'ai') {+ option.commentContent = customComments.join(',');+ }++ console.log('------ option', option);++ // return;++const res = await icpCreateInteractionOneKey(activeAccountId,selectedPostData,- {- commentContent: '不错啊!',- platform: activeAccountType,- ...values,- },+ option);console.log('------ res', res);