96 lines
2.3 KiB
TypeScript
96 lines
2.3 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from 'umi';
|
|
|
|
/** 此处后端没有提供注释 GET /user/ */
|
|
export async function usercontrollerGetuser(options?: { [key: string]: any }) {
|
|
return request<any>('/user/', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /user/add */
|
|
export async function usercontrollerAdduser(
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/user/add', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /user/list */
|
|
export async function usercontrollerListusers(options?: {
|
|
[key: string]: any;
|
|
}) {
|
|
return request<any>('/user/list', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /user/login */
|
|
export async function usercontrollerLogin(
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.LoginRes>('/user/login', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /user/logout */
|
|
export async function usercontrollerLogout(options?: { [key: string]: any }) {
|
|
return request<API.BooleanRes>('/user/logout', {
|
|
method: 'POST',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /user/toggleActive */
|
|
export async function usercontrollerToggleactive(
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/user/toggleActive', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /user/update/${param0} */
|
|
export async function usercontrollerUpdateuser(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.usercontrollerUpdateuserParams,
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/user/update/${param0}`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
params: {
|
|
...queryParams,
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|