import request from '@/config/axios'

export const getUserMemberList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/user/member/list',
    params: params
  })
}

export const giveUserMember = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/user/member/add',
    data
  })
}

export const getVipTypeList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/member/list',
    params: params
  })
}

export const addVipType = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/member/add',
    data
  })
}

export const updateVipType = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/member/update',
    data
  })
}

export const deleteVipType = async (id) => {
  return await request.delete({
    url: '/admin-api/applet/xunjia/member/delete?memberId=' + id
  })
}

export const getVipTypeOptions = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/member/simple-list',
    params: params
  })
}

export const getRechargeRecords = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/pay/list',
    params: params
  })
}
