import request from '@/utils/request'
import { URL } from '@/config'

export function getPayCardTypes(params) {
  return request({
    url: URL.pay.card.type.getPayCardTypes,
    method: 'get',
    params,
  })
}

export function getList(params) {
  return request({
    url: URL.pay.card.type.getList,
    method: 'get',
    params,
  })
}

export function bankCards(params) {
  return request({
    url: URL.pay.card.type.bankCards,
    method: 'get',
    params,
  })
}

export function doEdit(data) {
  return request({
    url: URL.pay.card.type.doEdit,
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: URL.pay.card.type.doDelete,
    method: 'post',
    data,
  })
}

export function getInfoList(params) {
  return request({
    url: URL.pay.card.info.getList,
    method: 'get',
    params,
  })
}

export function doInfoEdit(data) {
  return request({
    url: URL.pay.card.info.doEdit,
    method: 'post',
    data,
  })
}

export function getHistoryList(params) {
  return request({
    url: URL.pay.card.history.getHistoryList,
    method: 'get',
    params,
  })
}

export function doHistoryDelete(data) {
  return request({
    url: URL.pay.card.history.doHistoryDelete,
    method: 'post',
    data,
  })
}

export function expPayCardTemp(data) {
  return request({
    url: URL.pay.card.history.expPayCardTemp,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
