瀏覽代碼

附件名称

xiaohaizhao 3 月之前
父節點
當前提交
aa8bc915f1
共有 1 個文件被更改,包括 3 次插入1 次删除
  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,