import request from "@/api/request";

export default {
  // 开通会员
  async openMember(data) {
    return request({
      url: '/member/open',
      method: 'POST',
      data,
      needToken: true,
      showLoading: true
    })
  },

  // 取会员列表
  async getMemberList() {
    return request({
      url: '/member/list',
      method: 'GET'
    })
  },

  // 获取优惠卷
  async getCouponList(data) {
    return request({
      url: '/member/coupon',
      method: 'GET',
      needToken: true,
      data
    })
  },

  // 开通会员
  async openMember(data) {
    return request({
      url: '/member/open',
      method: 'POST',
      data,
      needToken: true,
      showLoading: true
    })
  },

  // 获取当前用户会员信息
  async getUserMemberInfo() {
    return request({
      url: '/member/userMemberInfo',
      method: 'GET',
      needToken: true
    })
  },
}