版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/web_longboss/article/details/84581520
// 注: 开发环境(获取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`