Browse Source

no message

linwenxin 6 months ago
parent
commit
faae1fe269
1 changed files with 8 additions and 7 deletions
  1. 8 7
      src/components/logistics2/common-logistics.vue

+ 8 - 7
src/components/logistics2/common-logistics.vue

@@ -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)
             }