重置下载文件前缀地址

//重置下载文件前缀地址
export const getDownloadPrefix = (url) => {
    let suffix = window.location.origin + window.location.pathname; //获取前缀
    if (process.env.NODE_ENV === 'development') {
      suffix = "https://xxxx.com/xxx/"
    }
    return suffix + url.slice(url.indexOf("/api"), url.length);
}、

  

posted @ 2024-11-04 11:24  三水儿  阅读(1)  评论(0编辑  收藏  举报