feat: 本次提交更新内容如下
开始迁移工作台了,有好多问题
This commit is contained in:
35
nkebao/src/api/autoLike.ts
Normal file
35
nkebao/src/api/autoLike.ts
Normal 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 });
|
||||
}
|
||||
26
nkebao/src/api/momentsSync.ts
Normal file
26
nkebao/src/api/momentsSync.ts
Normal 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 } });
|
||||
}
|
||||
Reference in New Issue
Block a user