import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/bank/cardswallow/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDownloadList = (params) => {
  return request({
    url: '/api/bank/cardswallow/getList',
    method: 'get',
    params: {
      ...params,
    }
  })
}

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

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

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

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

export const settingSave = (row) => {
  return request({
    url: '/api/bank/cardswallow/settingSave',
    method: 'post',
    data: row
  })
}

export const getSetting = () => {
  return request({
    url: '/api/bank/cardswallow/getSetting',
    method: 'get',
    params: {
    }
  })
}

export const cardswallowSubmit = (row) => {
  return request({
    url: '/api/bank/cardswallow/cardswallowSubmit',
    method: 'post',
    data: row
  })
}

export const cardswallowSubmitBatch = (list) => {
  return request({
    url: '/api/bank/cardswallow/cardswallowSubmitBatch',
    method: 'post',
    data: list
  })
}

export const issue = (row) => {
  return request({
    url: '/api/bank/cardswallow/issue',
    method: 'post',
    data: row
  })
}

export const signin = (row) => {
  return request({
    url: '/api/bank/cardswallow/signin',
    method: 'post',
    data: row
  })
}
