import request from '@/utils/request'

// 查询项目列表
export function listUserApi(query) {
  return request({
    url: '/ent/user/list',
    method: 'get',
    params: query
  })
}
//新增角色
export function addRoleApi(data) {
  return request({
    url: `/ent/user`,
    method: 'post',
    data: data
  })
}
//修改角色
export function updateUserApi(data) {
  return request({
    url: `/ent/user`,
    method: 'put',
    data: data
  })
}
//删除用户信息
export function deleteUserApi(ids) {
  return request({
    url: `/ent/user/${ids}`,
    method: 'delete'
  })
}
//重置密码
export function resetPwdApi(userId,data) {
  return request({
    url: `/ent/user/resetPwd/${userId}`,
    method: 'put',
    data: data
  })
}
//获取用户信息
export function getUserByIdApi(userId, query) {
  return request({
    url: `/ent/user/userInfo/${userId}`,
    method: 'get',
    params: query
  })
}
