From ba95f335923940cc25462da3c157c9ee373fa50c Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sun, 29 May 2022 13:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=8E=A5=E5=8F=A3=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/RightBottom.vue | 10 +++++++++- resources/assets/js/functions/eeui.js | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/RightBottom.vue b/resources/assets/js/components/RightBottom.vue index 3ae631f22..b7a913455 100644 --- a/resources/assets/js/components/RightBottom.vue +++ b/resources/assets/js/components/RightBottom.vue @@ -102,7 +102,15 @@ export default { axios.get($A.apiUrl('../version')).then(({status, data}) => { if (status === 200) { this.apiVersion = data.version || '' - if (this.$Electron) { + if (this.$isEEUiApp) { + // App 检查接口版本 + if (this.compareVersion(this.apiVersion, '0.14.94') === -1) { + $A.eeuiAppAlert({ + title: '温馨提示', + message: '服务器接口版本过低,有可能无法正常使用系统功能。', + }); + } + } else if (this.$Electron) { // 客户端提示更新 this.$Electron.sendMessage('updateCheckAndDownload', { apiVersion: this.apiVersion diff --git a/resources/assets/js/functions/eeui.js b/resources/assets/js/functions/eeui.js index 2d62fe53f..f1b06276b 100755 --- a/resources/assets/js/functions/eeui.js +++ b/resources/assets/js/functions/eeui.js @@ -10,6 +10,12 @@ * ============================================================================= */ $.extend({ + eeuiAppAlert(object, callback) { + if (!$A.isEEUiApp) return; + if (typeof callback !== "function") callback = _ => {}; + requireModuleJs("eeui").alert(object, callback); + }, + eeuiAppOpenPage(object, callback) { if (!$A.isEEUiApp) return; if (typeof callback !== "function") callback = _ => {};