console.log('res', res)
//token 是使页面不用去登录了
if (res.file) {
window.location.href =
Vue.prototype.$config.VUE_APP_BASE_IDSWAPI +
Vue.prototype.$config.VUE_APP_IDSW +
'/service/models/download?action=zip&filepath=' +
encodeURIComponent(encodeURIComponent(res['file'])) +
`&token=${localStorage.getItem('inmsToken')}&accessToken=${localStorage.getItem('accessToken')}`
}
responseType: “blob”,
let blob = new Blob([response.data], { type: “application/zip” }); //注意是response 或者 response.data
let url = window.URL.createObjectURL(blob); 这三句最重要!!!
//普通代码
axios.post(postUrl, params, {responseType: 'arraybuffer'}).then(res => {
// 创建Blob对象,设置文件类型
let blob = new Blob([res.data], {type: "application/vnd.ms-excel"})
let objectUrl = URL.creat