import request from '@/utils/request'

const BASE_API = process.env.VUE_APP_BASIC_API

/**
 * 根据vin查询未绑定的卡信息
 * @yapi http://yapi.cusc.com:3000/project/28/interface/api/8904
 */
export const queryUnBindCardByVin = (options) => {
  return request({
    url: `${BASE_API}newVinCard/queryUnBindCardByVin`,
    ...options
  })
}

/**
 * 根据vin查询绑定的卡信息
 * @yapi http://yapi.cusc.com:3000/project/28/interface/api/8908
 */
export const queryBindCardByVin = (options) => {
  return request({
    url: `${BASE_API}newVinCard/queryBindCardByVin`,
    ...options
  })
}

/**
 * 车卡关系校验(下一步)
 * @yapi http://yapi.cusc.com:3000/project/28/interface/api/8968
 */
export const checkVinCard = (data) => {
  return request({
    url: `${BASE_API}newVinCard/checkVinCard`,
    data
  })
}

/**
 * 检查vin(企业实名H5)
 * @yapi http://yapi.cusc.com:3000/project/28/interface/api/11016
 */
export const checkVin = data => {
  return request({
    url: `${BASE_API}newVinCard/checkVin`,
    data
  })
}
