From b5c0993eb8043882eae85ce9ab1d860ff8bebf17 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 28 三月 2024 13:52:56 +0800
Subject: [PATCH] #

---
 uni_modules/uni-upgrade-center-app/utils/call-check-version.js |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/uni_modules/uni-upgrade-center-app/utils/call-check-version.js b/uni_modules/uni-upgrade-center-app/utils/call-check-version.js
new file mode 100644
index 0000000..31f80e7
--- /dev/null
+++ b/uni_modules/uni-upgrade-center-app/utils/call-check-version.js
@@ -0,0 +1,29 @@
+export default function() {
+	// #ifdef APP-PLUS
+	return new Promise((resolve, reject) => {
+		plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
+			uniCloud.callFunction({
+				name: 'check-version',
+				data: {
+					appid: plus.runtime.appid,
+					appVersion: plus.runtime.version,
+					wgtVersion: widgetInfo.version
+				},
+				success: (e) => {
+					resolve(e)
+				},
+				fail: (error) => {
+					reject(error)
+				}
+			})
+		})
+	})
+	// #endif
+	// #ifndef APP-PLUS
+	return new Promise((resolve, reject) => {
+		reject({
+			message: '璇峰湪App涓娇鐢�'
+		})
+	})
+	// #endif
+}

--
Gitblit v1.9.1