From 8a7de013c1d5e0caeac59dedaeb404c5592733a1 Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期一, 16 三月 2026 09:56:05 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
utils/i18n.js | 38 +++++++++++++++++++++++++++-----------
1 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/utils/i18n.js b/utils/i18n.js
index f6293fa..e5d1b00 100644
--- a/utils/i18n.js
+++ b/utils/i18n.js
@@ -26,14 +26,26 @@
} = res.data
if (count == 1) {
enableCollectMissingKey = true
- return data
+ let getRemoteFile = true
+ if (!res.data.EnableRemoteI18n || res.data.EnableRemoteI18n == 'N') {
+ // 鍒ゆ柇鏈嶅姟鍣ㄦ槸鍚﹀惎鐢ㄥ璇█閰嶇疆椤癸紝鏃犺閰嶇疆椤规垨鑰呬笉鍚敤閰嶇疆椤癸紝鍒欎笉鏀堕泦缂哄け瀛楃涓诧紝浣跨敤鏈湴缈昏瘧鏂囦欢
+ enableCollectMissingKey = false
+ getRemoteFile = false
+ }
+ return {
+ data: data,
+ getRemoteFile: getRemoteFile
+ }
} else {
enableCollectMissingKey = false
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: "[i18n]鑾峰彇璇█鍖呭け璐�: " + Message
})
- return
+ return {
+ data: [],
+ getRemoteFile: false
+ }
}
} catch (err) {
enableCollectMissingKey = false
@@ -73,7 +85,7 @@
MissingKeysMap[key] = Array.from(MissingKeysMap[key])
}
}
- CommonUtils.doRequest2Sync({
+ await CommonUtils.doRequest2Sync({
url: "/Xt_grdAlignment_WMES/syncMissingKeyToDB",
data: {
missingObj: JSON.stringify(MissingKeysMap)
@@ -81,15 +93,19 @@
})
// 娓呴櫎缂哄け瀛楁缂撳瓨
MissingKeysMap = {}
+
+ uni.hideLoading()
// 閲嶅惎搴旂敤
const systemInfo = uni.getSystemInfoSync();
const platform = systemInfo.platform;
-
- if (platform === 'ios' || platform === 'android') {
- // App 绔細瀹屽叏閲嶅惎
- plus.runtime.restart();
- } else if (platform === 'h5') {
- // H5 绔細鍒锋柊椤甸潰
- window.location.reload();
- }
+ // #ifdef APP-PLUS
+ // App 绔細瀹屽叏閲嶅惎
+ plus.runtime.restart();
+ // #endif
+ // #ifdef H5
+ console.log('H5鍥炲埌鐧诲綍椤�: ');
+ uni.reLaunch({
+ url: '/pages/index/login'
+ })
+ // #endif
}
\ No newline at end of file
--
Gitblit v1.9.1