补充API

This commit is contained in:
xiaozzzi 2023-11-17 15:57:35 +08:00
parent 3b11031966
commit 887f4c6a7a
3 changed files with 168 additions and 1 deletions

View File

@ -15,9 +15,12 @@ export const userinfoApi = (params?: object): Promise<R<any>> => {
* @param params
* @returns
*/
export const docTreeApi = (params?: object): Promise<R<any>> => {
export const docTreeOpenApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/doc/trees/open', { params })
}
export const docTreeApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/doc/trees', { params })
}
/**
*
@ -56,3 +59,7 @@ export const articleWordLineApi = (params?: object): Promise<R<any>> => {
export const articleInfoOpenApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/article/open/info', { params })
}
export const articleInfoApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/article/info', { params })
}

View File

@ -0,0 +1,22 @@
import { defaultRequest as rq } from "./request";
import type { R } from "./request";
export const planListDayApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>("/plan/list/day", { params });
}
export const planListDailyApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>("/plan/list/daily", { params });
}
export const planAddDailyApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>("/plan/add/daily", data);
}
export const planAddDayApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>("/plan/add/day", data);
}
export const planDelApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>("/plan/del", data);
}

138
blossom-web/src/api/todo.ts Normal file
View File

@ -0,0 +1,138 @@
import { defaultRequest as rq } from './request'
import type { R } from './request'
/**
*
*/
export const taskStatApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/task/stat', { params })
}
/**
*
*/
export const todoStatApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/stat', { params })
}
//#region ---------------------------------------- todo ----------------------------------------
/**
*
*/
export const todosApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/list', { params })
}
/**
*
*/
export const countTaskApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/task/count', { params })
}
/**
*
*/
export const addPhasedApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/add/phased', data)
}
/**
*
*/
export const updTodoNameApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/upd/name', data)
}
/**
*
*/
export const openTodoApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/open', data)
}
/**
*
*/
export const completedTodoApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/completed', data)
}
/**
*
*/
export const exportTodoApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/export', { params })
}
//#endregion
//#region ---------------------------------------- task ----------------------------------------
/**
*
*/
export const tasksApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/task/list', { params })
}
/**
*
*/
export const taskInfoApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/task/info', { params })
}
/**
*
*/
export const addTaskApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/add', data)
}
/**
*
*/
export const updTaskApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/upd', data)
}
/**
* waiting
*/
export const toWaitingApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/waiting', data)
}
/**
* processing
*/
export const toProcessingApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/processing', data)
}
/**
* completed
*/
export const toCompletedApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/completed', data)
}
/**
*
*/
export const delTaskApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/del', data)
}
/**
*
*/
export const taskTagsApi = (params?: object): Promise<R<any>> => {
return rq.get<R<any>>('/todo/task/tags', { params })
}
export const taskTransferApi = (data?: object): Promise<R<any>> => {
return rq.post<R<any>>('/todo/task/transfer', data)
}
//#endregion