import request from './request'

// 获取会员列表
export const getMembers = (params) => {
  return request({
    url: '/members',
    method: 'get',
    params
  })
}

// 更新会员信息
export const updateMember = (id, data) => {
  return request({
    url: `/members/${id}`,
    method: 'put',
    data
  })
}

// 删除会员
export const deleteMember = (id) => {
  return request({
    url: `/members/${id}`,
    method: 'delete'
  })
}

// 批量删除会员
export const deleteMembers = (ids) => {
  return request({
    url: '/members/batch',
    method: 'delete',
    data: { ids }
  })
}

// 获取会员详情
export const getMemberDetail = (id) => {
  return request({
    url: `/members/${id}`,
    method: 'get'
  })
}
