import request from '@/utils/request'

// 用户列表
export function getMiddlesManageUsers (parameter) {
  return request({
    url: '/middles/manage/users',
    method: 'get',
    params: parameter
  })
}

// 新增管理账号
export function addMiddlesManageUser (parameter) {
  return request({
    url: '/middles/manage/users',
    method: 'post',
    params: parameter
  })
}

// 修改管理账号
export function editMiddlesManageUser (middleId, parameter) {
  return request({
    url: `/middles/manage/users/${middleId}`,
    method: 'put',
    params: parameter
  })
}

// 删除管理账号
export function delMiddlesManageUser (middleId) {
    return request({
      url: `/middles/manage/users/${middleId}`,
      method: 'DELETE'
    })
}

// 删除管理账号
export function setMiddlesManageUserStatus (middleId, parameter) {
  return request({
    url: `/middles/manage/users/${middleId}/set_status`,
    method: 'post',
    params: parameter
  })
}
