Skip to content

Let's use AI to Earn!

可以

daoyian612b8e23e6df
diff --git a/electron/main/interaction/controller.ts b/electron/main/interaction/controller.ts
index 2b266a0c..06c32fa5 100644
--- a/electron/main/interaction/controller.ts
+++ b/electron/main/interaction/controller.ts
@@ -184,28 +184,36 @@ export class InteractionController {
// 自动互动, 每10秒进行
@Scheduled('0 * * * * *', 'autoHudong')
async zidongHudong() {
+ return;
console.log('自动互动 ing ...');
const res = await taskApi.getActivityTask();
- // console.log('---- zidongHudong ----', res);
+ console.log('---- zidongHudong ----', res);
const userList = await this.interactionService.getUserList();
// console.log('---- userList ----', userList);
- const accountList = await this.interactionService.getAccountList(userList[1].id);
+ if (!userList.length) {
+ return;
+ }
+ const accountList = await this.interactionService.getAccountList(userList[userList.length - 1].id);
// console.log('---- accountList ----', accountList);
if (res.items.length > 0) {
for (const item of res.items) {
item.accountTypes.forEach((accountType: any) => {
let myAccountTypeList = [];
for (const account of accountList) {
- if (account.type === accountType) {
+ if (account.type === accountType && account.status === 0) {
myAccountTypeList.push(account);
}
}
console.log('---- myAccountTypeList ----', myAccountTypeList);
for (const account of myAccountTypeList) {
- console.log('---- account ----', account);
+ // console.log('---- account ----', account);
const autorInteractionList = this.interactionService.getAutorInteractionList(account, [{
- workId: item.workId,
+ author: {id: item.authorId || ''} ,
+ data : {id: item.dataInfo.worksId, xsec_token: 'CB9V06UUjwYTrJGcYNNohN8lG4IpBGncEsTF4G7mOPVtI='},
+ dataId : item.dataInfo.worksId,
+ option : {xsec_token: 'CB9V06UUjwYTrJGcYNNohN8lG4IpBGncEsTF4G7mOPVtI=='},
+ title : item.title,
}], {
accountType: accountType,
});
diff --git a/electron/main/interaction/service.ts b/electron/main/interaction/service.ts
index 256669d5..683e768c 100644
--- a/electron/main/interaction/service.ts
+++ b/electron/main/interaction/service.ts
@@ -305,7 +305,7 @@ export class InteractionService {
if (shouldLike) {
try {
- console.log('------ 开始点赞作品:', works.dataId);
+ console.log('------ 开始点赞作品:', works.dataId, works.author?.id);
const isLikeRes = await platController.dianzanDyOther(
account,
works.dataId,
@@ -509,9 +509,9 @@ export class InteractionService {
{
commentContent: option.commentContent || null,
platform: option.accountType, // 平台
- likeProb: 100, // 点赞概率
- collectProb: 100, // 收藏概率
- commentProb: 100, // 评论概率
+ likeProb: 999, // 点赞概率
+ collectProb: 999, // 收藏概率
+ commentProb: 999, // 评论概率
commentType: 'ai', // 评论类型
},
(e: {