import request from '@/utils/request'
//登录
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
  })
}
//获取用户信息
export function getInfo(data) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { id:data.userId }
  })
}
//添加用户
export function addUserinfo(data) {
  return request({
    url: '/user/save',
    method: 'post',
    data,
  })
}
//用户列表
export function getUserlist(data) {
  return request({
    url: '/user/list',
    method: 'post',
    data
  })
}
//删除用户
export function deleteUser(data) {
  return request({
    url: '/user/del',
    method: 'post',
    data
  })
}
//修改用户
export function updateUser(data) {
  return request({
    url: '/user/edit',
    method: 'post',
    data
  })
}
//重置密码
export function resetpwd(data) {
  return request({
    url: '/user/initPwd',
    method: 'post',
    data
  })
}
//用户修改密码
export function updatepwd(data) {
  return request({
    url: '/user/editPwd',
    method: 'post',
    data
  })
}
