1. 程式人生 > >獲取伺服器下載地址

獲取伺服器下載地址

// 注: 開發環境(獲取webpack代理地址)、生產環境(獲取線上伺服器地址)
export function getServerPath () {
  const http = 'http://'
  return process.env.NODE_ENV === 'development' ? `${dev.proxyTable['/'].target}` : `${http}${window.location.host}`
}


// api
const DOWNLOAD_EXCEL= `${ getServerPath () }/download/excel`