xiaohaizhao hai 3 meses
pai
achega
aa8bc915f1
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packageA/market/detail.js

+ 3 - 1
packageA/market/detail.js

@@ -178,8 +178,10 @@ Page({
 		})
 		wx.downloadFile({
 			url: item.url,
+			filePath: wx.env.USER_DATA_PATH + '/' + item.document, // 本地自定义的文件名
 			success: function (res) {
-				const filePath = res.tempFilePath
+				console.log(res)
+				const filePath = res.tempFilePath || res.filePath
 				wx.openDocument({
 					filePath: filePath,
 					showMenu: true,