import { axios } from '@/utils/request'

// 重置密码
export const resetPSD = params => {
  return axios({
    url: `zxyj/user/resetPwd`,
    data: params,
    method: 'POST'
  })
}

// 获取列表数据
export const getPowerUserList = params => {
  const url = `/user/queryLike/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'POST'
  })
}

// 改变权限状态接口
export const updateEnableStatus = params => {
  return axios({
    url: `/user/enable/${params.id}/${params.flag}`,
    data: {},
    method: 'get'
  })
}

// 删除用户接口
export const delectUserPower = params => {
  return axios({
    url: `/user/delete/${params.id}`,
    data: {},
    method: 'get'
  })
}

// 新增/编辑保存接口
export const saveUserPower = params => {
  return axios({
    url: '/user/save',
    data: params,
    method: 'POST'
  })
}

// 获取角色列表接口
export const getRoleList = params => {
  return axios({
    url: '/role/findAll',
    data: params,
    method: 'POST'
  })
}
