From 9f0f5d7767506658ab5ca47ba8ff4ede423e47e3 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 22 一月 2025 10:10:45 +0800
Subject: [PATCH] -

---
 src/common/utils/util.js |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/src/common/utils/util.js b/src/common/utils/util.js
index 2f75f03..2d14f09 100644
--- a/src/common/utils/util.js
+++ b/src/common/utils/util.js
@@ -838,5 +838,30 @@
 			}
 		}
 	},
-
+	checkFileExtensions(str) {
+		const extensions = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
+		return extensions.some(extension => str.includes(extension));
+	},
+	previewWechat(urlPdf) {
+		uni.showLoading({
+			title: '姝e湪鍔犺浇涓�..'
+		})
+		uni.downloadFile({
+			url: urlPdf,
+			success: function(res) {
+				var filePath = res.tempFilePath;
+				uni.openDocument({
+					filePath: filePath,
+					showMenu: true,
+					success: function(res) {
+						console.log('鎵撳紑鏂囨。鎴愬姛');
+						uni.hideLoading()
+					},
+				});
+			},
+			complete: function(r) {
+				uni.hideLoading()
+			}
+		});
+	},
 }
\ No newline at end of file

--
Gitblit v1.9.1