import request from '@/router/axios';



export const addUserSelfTake = (params) => {
  return request({
    url: '/api/groupon/selftake/addUserSelfTake',
    method: 'post',
    data: params
  })
}

export const listByUserId = (userId) => {
  return request({
    url: '/api/groupon/selftake/listByUserId?userId='+userId,
    method: 'post',
    params: {}
  })
}



export const getList = (current, size, params) => {
  return request({
    url: '/api/groupon/selftake/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/groupon/selftake/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/groupon/selftake/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/groupon/selftake/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/groupon/selftake/submit',
    method: 'post',
    data: row
  })
}

