// 下载doc url let href = “base64编码” let fileName = "文件名.doc // 下载 doc this.http.get(href, { observe: \'response\', responseType: \'blob\', }).subscribe(res:Blob => {
// 返回的数据流为Blob const file = decodeURIComponent(fileName); this._FileSaverService.save(res.body, file); this.isDownload = false; }, err => { this.isDownload = false; this.message.create(\'error\', \'下载失败!\'); });