import request from '@/utils/request'

// 查询会员列表
export function listUser(query) {
  return request({
    url: '/back/user/list',
    method: 'get',
    params: query
  })
}

// 查询会员详细
export function getUser(userId) {
  return request({
    url: '/back/user/' + userId,
    method: 'get'
  })
}

// 修改会员
export function updateUser(data) {
  return request({
    url: '/back/user/update',
    method: 'post',
    data: data
  })
}

// 修改会员状态
export function changeUserStatus(data) {
  return request({
    url: '/back/user/changeStatus',
    method: 'post',
    data: data
  })
}

// 删除会员
export function delUser(userId) {
  return request({
    url: '/back/user/' + userId,
    method: 'delete'
  })
}