linwenxin 6 ماه پیش
والد
کامیت
5b3a9b3cef
1فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 9 7
      src/components/logistics2/common-logistics.vue

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

@@ -61,13 +61,15 @@ export default {
         const filename = url.split('/').pop().split('?')[0] // 获取文件名
         const fileExtension = filename.split('.').pop().toLowerCase() // 获取文件扩展名
 
-        // H5环境下下载
-        const link = document.createElement('a')
-        link.href = url
-        link.download = `${filename}.${fileExtension}` // 设置下载文件名
-        document.body.appendChild(link)
-        link.click()
-        document.body.removeChild(link)
+        window.open(url, '_blank')
+
+        // // H5环境下下载
+        // const link = document.createElement('a')
+        // link.href = url
+        // link.download = `${filename}.${fileExtension}` // 设置下载文件名
+        // document.body.appendChild(link)
+        // link.click()
+        // document.body.removeChild(link)
 
         // // 判断当前平台
         // const platform = uni.getSystemInfoSync().platform