import request from '@/utils/request'


export function searchAdmin(data) {
  return request({
    url: '/user/search',
    method: 'post',
    data
  })
}


export function createAdmin(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}


export function getAdminInfo(data) {
  return request({
    url: '/user/info',
    method: 'post',
    data
  })
}


export function updateAdmin(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}


export function updateProfile(data) {
  return request({
    url: '/user/profile',
    method: 'post',
    data
  })
}


export function changeUserPassword(data) {
  return request({
    url: '/user/password',
    method: 'post',
    data
  })
}

export function deleteAdmin(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data
  })
}

/* 获取权限 */
export function selectUserOperation(data) {
  return request({
    url: '/user/selectUserOperation',
    method: 'post',
    data
  })
}
