这是我的下载代码:
var mimeType = this.getMime(obj);
var ab = this.base64ToArrayBuffer(obj[key]);
var blob = new Blob([ab.buffer], {
type : mimeType
});
var result = this.bintostring(blob);
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');
a.href = url;
a.download = result.filename;
a.target = '_blank';
a.click();
window.URL.revokeObjectURL(url);
调试期间,我没有看到任何异常。