linwenxin il y a 6 mois
Parent
commit
faae1fe269
1 fichiers modifiés avec 8 ajouts et 7 suppressions
  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)
             }