| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 新增账号信息 POST /api/User/CreateAccount */ |
| | | export async function createAccount(body: API.CreateAccountInput, options?: API.RequestConfig) { |
| | | return request<string>('/api/User/CreateAccount', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/User/CreateRole */ |
| | | export async function createRole(body: API.CreateOrUpdateRoleInput, options?: API.RequestConfig) { |
| | | return request<string>('/api/User/CreateRole', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/User/DeleteRole */ |
| | | export async function deleteRole( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIdeleteRoleParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/User/DeleteRole', { |
| | | method: 'POST', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取所有角色 GET /api/User/GetAllRoles */ |
| | | export async function getAllRoles(options?: API.RequestConfig) { |
| | | return request<API.RoleInfo[]>('/api/User/GetAllRoles', { |
| | | /** 获取个人信息详情 GET /api/User/GetUserInfo */ |
| | | export async function getUserInfo(options?: API.RequestConfig) { |
| | | return request<API.UserDto>('/api/User/GetUserInfo', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/User/GetOssSTS */ |
| | | export async function getOssSTS(options?: API.RequestConfig) { |
| | | return request<API.OssSTSReponse>('/api/User/GetOssSTS', { |
| | | method: 'POST', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取角色分页列表 POST /api/User/GetRoles */ |
| | | export async function getRoles(body: API.GetRolesInput, options?: API.RequestConfig) { |
| | | return request<API.RoleInfoPageOutput>('/api/User/GetRoles', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取token POST /api/User/GetTokenForWeb */ |
| | | export async function getTokenForWeb(body: API.AccessRequestDto, options?: API.RequestConfig) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/User/GetTokenForWeb', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取用户详情 GET /api/User/GetUserDetail */ |
| | | export async function getUserDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserDetailParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserDetailOutput>('/api/User/GetUserDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取用户分页列表 POST /api/User/GetUserPage */ |
| | | export async function getUserPage(body: API.QueryUserPageInput, options?: API.RequestConfig) { |
| | | return request<API.UserListOutputPageOutput>('/api/User/GetUserPage', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 密码登录 POST /api/User/PasswordLogin */ |
| | | export async function passwordLogin(body: API.PasswordLoginInput, options?: API.RequestConfig) { |
| | | return request<API.IdentityModelTokenCacheItem>('/api/User/PasswordLogin', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/User/RoleEnableOrForbid */ |
| | | export async function roleEnableOrForbid( |
| | | body: API.RoleEnableOrForbidInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/User/RoleEnableOrForbid', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 更新账号信息 POST /api/User/UpdateAccount */ |
| | | export async function updateAccount(body: API.UpdateAccountInput, options?: API.RequestConfig) { |
| | | return request<number>('/api/User/UpdateAccount', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/User/UpdateRole */ |
| | | export async function updateRole(body: API.CreateOrUpdateRoleInput, options?: API.RequestConfig) { |
| | | return request<number>('/api/User/UpdateRole', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |