import api from './api'

/**
 * 创建发票申请  
 */
export function createInvoiceApplication(data) {
  return api.post(`/invoiceapplication/create`, data, { login: false })
}

/**
 * 获取发票申请历史  
 */
export function getInvoiceApplicationList(data) {
  return api.get(`/invoiceapplication/list`, data, { login: false })
}

/**
 * 获取发票申请详情  
 */
export function getInvoiceApplicationDetail(id) {
  return api.get(`/invoiceapplication/detail/${id}`, {}, { login: false })
}

/**
 * 获取用户发票信息  
 */
export function getUserInvoiceInfo(id) {
  return api.get(`/invoiceapplication/get?id=${id}`, {}, { login: false })
}

/**
 * 判断用户是否已经填写开发票所需信息  
 */
export function checkUserInvoiceInfo() {
  return api.get(`/invoiceapplication/check-info`,{ login: false })
}
