Skip to content

Let's use AI to Earn!

style: 1

牛文政73ef5475d2c7
diff --git a/commont/types/task.ts b/commont/types/task.ts
index a2fec9fe..eb3b9494 100644
--- a/commont/types/task.ts
+++ b/commont/types/task.ts
@@ -58,6 +58,7 @@ export interface TaskInteraction extends TaskData {
accountType: AccountType; // 平台类型
worksId: string; // 作品ID
authorId?: string; // 作者ID
+ commentContent?: string; // 评论内容,不填则使用AI
}
export type TaskDataInfo =
diff --git a/electron/main/interaction/service.ts b/electron/main/interaction/service.ts
index 4ba0527c..77ed048e 100644
--- a/electron/main/interaction/service.ts
+++ b/electron/main/interaction/service.ts
@@ -138,7 +138,11 @@ export class InteractionService {
});
try {
- console.log('------ 开始执行互动任务,作品数量:', worksList.length, worksList[0]);
+ console.log(
+ '------ 开始执行互动任务,作品数量:',
+ worksList.length,
+ worksList[0],
+ );
scheduleEvent({
tag: AutorWorksInteractionScheduleEvent.Start,
status: 0,
@@ -155,7 +159,7 @@ export class InteractionService {
);
if (oldRecord) continue;
- console.log('option.commentContent', option.commentContent)
+ console.log('option.commentContent', option.commentContent);
if (!option.commentContent) {
const aiRes = await toolsApi.aiRecoverReview({
content: (works.desc || '') + (works.title || ''),
@@ -184,14 +188,19 @@ export class InteractionService {
});
// ----- 1-评论作品 -----
- console.log('------ 开始评论作品:', works.dataId,option.commentContent,works.author?.id)
+ console.log(
+ '------ 开始评论作品:',
+ works.dataId,
+ option.commentContent,
+ works.author?.id,
+ );
const commentWorksRes = await platController.createCommentByOther(
account,
works.dataId,
option.commentContent,
works.author?.id,
);
- console.log('------ 评论作品结果:', commentWorksRes)
+ console.log('------ 评论作品结果:', commentWorksRes);
// 错误处理
if (!commentWorksRes) {