annexClick(item) {
				let fileurl=formatPic(item.attchPath.replace(/\\/g,'/'))
				uni.downloadFile({
					url: fileurl,
					success: function(res) {
						var filePath = res.tempFilePath;					
							uni.openDocument({
								filePath: filePath,
								showMenu: true,
								success: function(res) {
									console.log('打开文档成功');
								},
								fail: function(err) {
									uni.showToast({
										icon: 'none',
										mask: true,
										title: err.errMsg,
										duration: 3000,
									});
								}
							});					
					},
					fail: function(err) {
						uni.showToast({
							icon: 'none',
							mask: true,
							title: err.errMsg,
							duration: 3000,
						});
					}

				});
			},

更多推荐