From 0debeb9d6cfed5c4e6cd08eadc67acce164b12c8 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期三, 11 三月 2026 20:28:14 +0800
Subject: [PATCH] 修复 除 登录页面外,其余页面无法在网页端进行多语言同步的问题
---
utils/i18n.js | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/utils/i18n.js b/utils/i18n.js
index 1d3b27a..e5d1b00 100644
--- a/utils/i18n.js
+++ b/utils/i18n.js
@@ -85,7 +85,7 @@
MissingKeysMap[key] = Array.from(MissingKeysMap[key])
}
}
- CommonUtils.doRequest2Sync({
+ await CommonUtils.doRequest2Sync({
url: "/Xt_grdAlignment_WMES/syncMissingKeyToDB",
data: {
missingObj: JSON.stringify(MissingKeysMap)
@@ -98,12 +98,14 @@
// 閲嶅惎搴旂敤
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