import api from './request'

// 获取会员列表
export const getMembers = (params) => {
  return api.get('/members', { params })
}

// 更新会员信息
export const updateMember = (id, data) => {
  return api.put(`/members/${id}`, data)
}

// 删除会员
export const deleteMember = (id) => {
  return api.delete(`/members/${id}`)
}

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

// 获取会员详情
export const getMemberDetail = (id) => {
  return api.get(`/members/${id}`)
}
