import request from '@/config/axios'

// 分页
export const getUserPage = (params) => {
  return request.get({ url: 'admin-api/applet/sinology/sys/user/page', params })
}

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

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

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

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

export const getVipType = async (id) => {
  return await request.get({
    url: '/admin-api/applet/sinology/sys/member/get?id=' + id
  })
}

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

export const searchVipRecord = async (params) => {
  return await request.get({
    url: '/admin-api/applet/sinology/memberLog/page',
    params
  })
}
