Parcourir la source

fix 下载文件

he2802 il y a 3 ans
Parent
commit
9181bbe210
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      pages2/verify/input2.vue

+ 8 - 0
pages2/verify/input2.vue

@@ -111,8 +111,16 @@ export default {
 					url: this.$method.splitImgHost(res.data.msg),
 					success: result => {
 						if (result.statusCode === 200) {
+							const filePath = result.tempFilePath
 							console.log(this.$method.splitImgHost(res.data.msg));
 							this.$method.showToast('下载成功');
+							uni.openDocument({
+							    filePath: filePath,
+							    fileType:'doc',
+							    showMenu:true,
+							    success: function (res) {
+							    }
+							  })
 						}
 					}
 				});