feat: 本次提交更新内容如下

开始迁移工作台了,有好多问题
This commit is contained in:
2025-07-08 08:59:58 +08:00
parent 5d68a41931
commit 521a3f1269
11 changed files with 3436 additions and 3979 deletions

View File

@@ -0,0 +1,35 @@
import { get, post } from './request';
export interface LikeTask {
id: string;
name: string;
status: 'running' | 'paused';
deviceCount: number;
targetGroup: string;
likeCount: number;
lastLikeTime: string;
createTime: string;
creator: string;
likeInterval: number;
maxLikesPerDay: number;
timeRange: { start: string; end: string };
contentTypes: string[];
targetTags: string[];
}
export async function fetchAutoLikeTasks(): Promise<LikeTask[]> {
const res = await get('/api/workbench/auto-like/list');
return res.data?.list || [];
}
export async function deleteAutoLikeTask(id: string) {
return post('/api/workbench/auto-like/delete', { id });
}
export async function toggleAutoLikeTask(id: string, status: string) {
return post('/api/workbench/auto-like/toggle', { id, status });
}
export async function copyAutoLikeTask(id: string) {
return post('/api/workbench/auto-like/copy', { id });
}

View File

@@ -0,0 +1,26 @@
import { get, post } from './request';
export interface MomentsSyncDevice {
id: string;
name: string;
status: 'idle' | 'syncing' | 'success' | 'error';
lastSyncTime: string;
progress: number; // 0-100
log: string;
}
export async function fetchMomentsSyncDevices(search?: string) {
return get('/api/moments-sync/list', search ? { params: { search } } : undefined);
}
export async function syncMoments(id: string) {
return post('/api/moments-sync/sync', { id });
}
export async function syncAllMoments() {
return post('/api/moments-sync/sync-all');
}
export async function fetchMomentsLog(id: string) {
return get('/api/moments-sync/log', { params: { id } });
}