pc端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.4 KiB

// noinspection SpellCheckingInspection
import http from 'utils/axios';
const apiUrl = import.meta.env.VITE_API_URL;
const users = `${apiUrl}/gateway/tall3/v3.0/users`;
const tall = `${apiUrl}/gateway/tall3/v3.0`;
const experiment = `${apiUrl}/gateway/experiment`;
// 根据userId 获取token
// eslint-disable-next-line import/prefer-default-export
export const getToken = userId => http.get(`${users}/userId`, { params: { userId } });
// 登录api
export const signIn = params => http.post(`${users}/signin`, params);
// 获取项目列表
export const getProjects = (startTime, endTime) => http.post(`${tall}/project/query`, { param: { startTime, endTime } });
// 根据项目id查找角色
export const findShowRole = projectId => http.post(`${experiment}/role/show`, { param: { projectId } });
// 根据项目id查找所有成员
export const queryChecker = param => http.post(`${tall}/deliver/queryChecker`, param);
// 查找带时间的日常任务
export const getGlobal = params => http.post(`${experiment}/task/global`, params);
// 查找永久日常任务
export const getPermanent = params => http.post(`${experiment}/task/permanent`, params);
// 查找定期任务
export const getRegularTask = params => http.post(`${experiment}/task/regular`, params);
// 添加任务
export const saveTask = params => http.post(`${experiment}/task/save`, params);
// 查询子任务
export const findSonTask = params => http.post(`${experiment}/task/findSonTask`, params);