更新
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export const downloadFile=(fileUrl,name='')=>{
|
||||
let startIndex=fileUrl.indexOf("output");
|
||||
let startIndex=fileUrl.lastIndexOf("/");
|
||||
let endIndex=fileUrl.lastIndexOf(".");
|
||||
let originName=fileUrl.substring(startIndex,endIndex);
|
||||
let originName=fileUrl.substring(startIndex+1,endIndex);
|
||||
const request = new XMLHttpRequest()
|
||||
request.open('GET', fileUrl)
|
||||
request.responseType = 'blob'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import axios from 'axios';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { useUserStore } from '../store/userInfo'
|
||||
import {globals} from '../main.js'
|
||||
|
||||
|
||||
// create an axios instance
|
||||
console.log("________"+import.meta.env.VITE_BASE_URL)
|
||||
@@ -111,6 +113,7 @@ service.interceptors.response.use(
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
globals?.$loading.hide();
|
||||
return Promise.reject(message);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user