import request from '@/utils/request'
import Qs from 'qs'

export function listSpdBank(query) {
  return request({
    url: '/spdBank/list',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
  }
  })
}

export function createSpdBank(data) {
  return request({
    url: '/spdBank/create',
    method: 'post',
    data
  })
}

export function readSpdBank(data) {
  return request({
    url: '/spdBank/read',
    method: 'get',
    data
  })
}

export function updateSpdBank(data) {
  return request({
    url: '/spdBank/update',
    method: 'post',
    data
  })
}

export function deleteSpdBank(data) {
  return request({
    url: '/spdBank/delete',
    method: 'post',
    data
  })
}

export function spdCoupon(data) {
    return request({
      url: '/spdBank/spdCoupon',
      method: 'get'
    })
}

export function importBooking(data, config) {
    return request({
        url: '/spdBank/import',
        method: 'post',
        config: config,
        data
    })
}
export function sendSms(query) {
  return request({
    url: '/spdBank/send',
    method: 'get',
    params: query
  })
}
export function cancel(data, config) {
  return request({
      url: '/spdBank/cancel',
      method: 'post',
      config: config,
      data
  })
}
export function bind(query) {
  return request({
    url: '/spdBank/bind',
    method: 'get',
    params: query
  })
}