import request from '@/utils/request'

export function emailList() {
    return request({
      url: '/email/listEmail',
      method: 'get',
    })
  }



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

  export function updateList(data) {
    return request({
      url: `/email/updateEmail`,
      method: 'post',
      data: data
    })
  }

  export function add(data) {
    return request({
      url: `/email/createEmail`,
      method: 'post',
      data: data
    })
  }


    // 根据权益名称id查询权益
    export function getBenefitByBenefitId() {
      return request({
        url: '/benefit/getBenefitByBenefitId',
        method: 'get',
      })
    }
    // 添加权益
    export function addBenefit(data) {
      return request({
        url: `/benefit/add`,
        method: 'post',
        data: data
      })
    }