import request from '@/utils/request'

// 查询会员关系列表
export function listRelation(query) {
  return request({
    url: '/account/relation/list',
    method: 'get',
    params: query
  })
}

// 查询会员关系详细
export function getRelation(uid) {
  return request({
    url: '/account/relation/' + uid,
    method: 'get'
  })
}

// 新增会员关系
export function addRelation(data) {
  return request({
    url: '/account/relation',
    method: 'post',
    data: data
  })
}

// 修改会员关系
export function updateRelation(data) {
  return request({
    url: '/account/relation',
    method: 'put',
    data: data
  })
}

// 删除会员关系
export function delRelation(uid) {
  return request({
    url: '/account/relation/' + uid,
    method: 'delete'
  })
}
