import type { TrainArchiveDetail } from '#/views/x/tms/trainArchive/types';
|
|
import { defHttp } from '#/api/request';
|
import { mockGetMyTrainArchive } from '#/views/x/tms/trainArchive/mock';
|
|
/** 后端未就绪前走 mock;联调后改为 false */
|
const USE_MOCK = true;
|
const prefix = '/api/tms/train-archive';
|
|
export function getMyTrainArchive(user?: {
|
userId?: string;
|
userName?: string;
|
userAccount?: string;
|
organizeName?: string;
|
positionName?: string;
|
}) {
|
if (USE_MOCK) return mockGetMyTrainArchive(user);
|
return defHttp.get<TrainArchiveDetail>({ url: `${prefix}/mine` });
|
}
|