import request from '@/utils/request'

export function list() {
    return request({
      url: '/memberLevel/list',
      method: 'get',
    })
  }

  export function deleteList(id) {
    return request({
      url: '/memberLevel/deleteMemberLevel?id=' + id,
      method: 'get',
    })
  }

  export function updateList(data) {
    return request({
      url: `/memberLevel/updateMemberLevel`,
      method: 'post',
      data: data
    })
  }
  export function add(data) {
    return request({
      url: `/memberLevel/addMemberLevel`,
      method: 'post',
      data: data
    })
  }

    //绑定会员权益
  export function addMemberBenefit(data) {
    return request({
      url: `/memberBenefit/addMemberBenefit`,
      method: 'post',
      data: data
    })
  }


//获取当前会员的权益
  export function getMemberBenefit(data) {
    return request({
      url: '/memberBenefit/getMemberBenefit?memberLevelId=' + data.id,
      method: 'get',
    })
  }
  