|
@@ -82,13 +82,14 @@ export default {
|
|
|
success: res => {
|
|
|
alert(JSON.stringify(res))
|
|
|
if (res.statusCode === 200) {
|
|
|
- // H5环境下下载
|
|
|
- const link = document.createElement('a')
|
|
|
- link.href = res.tempFilePath
|
|
|
- link.download = `${filename}.${fileExtension}` // 设置下载文件名
|
|
|
- document.body.appendChild(link)
|
|
|
- link.click()
|
|
|
- document.body.removeChild(link)
|
|
|
+ window.open(res.tempFilePath, '_blank')
|
|
|
+ // // H5环境下下载
|
|
|
+ // const link = document.createElement('a')
|
|
|
+ // link.href = res.tempFilePath
|
|
|
+ // link.download = `${filename}.${fileExtension}` // 设置下载文件名
|
|
|
+ // document.body.appendChild(link)
|
|
|
+ // link.click()
|
|
|
+ // document.body.removeChild(link)
|
|
|
} else {
|
|
|
reject('Download failed: ' + res.statusCode)
|
|
|
}
|