83 lines
1.8 KiB
TypeScript
83 lines
1.8 KiB
TypeScript
import { request } from '@umijs/max';
|
|
|
|
|
|
|
|
// 用户分页
|
|
export async function userPage(params: any) {
|
|
return request('/api/sys/user/page', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
// 新增用户
|
|
export async function userAdd(params: any) {
|
|
return request('/api/sys/user/add', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
export async function userUpdate(params: any) {
|
|
return request('/api/sys/user/update', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
export async function userInfo(params: any) {
|
|
return request('/api/sys/user/getInfo', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
|
|
// 修改用户密码
|
|
export async function userUpPwd(params: any) {
|
|
return request('/api/sys/user/resetPwd', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
// 删除用户
|
|
export async function userDelete(params: any) {
|
|
return request('/api/sys/user/deleteUserBatchByIds', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|
|
|
|
// 重置绵绵
|
|
|
|
export async function resetPwd(params: any) {
|
|
return request('/api/sys/user/resetPwd', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
},
|
|
data: params,
|
|
});
|
|
}
|
|
|