From 92b62eae6ee68bd693457a16f3bdfb1d684a8fec Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 20 三月 2025 14:37:17 +0800
Subject: [PATCH] #修复 库位修改保存失败修复
---
rsf-admin/src/App.jsx | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/rsf-admin/src/App.jsx b/rsf-admin/src/App.jsx
index 12d5306..328a4b6 100644
--- a/rsf-admin/src/App.jsx
+++ b/rsf-admin/src/App.jsx
@@ -11,6 +11,7 @@
} from "react-admin";
import polyglotI18nProvider from "ra-i18n-polyglot";
import englishMessages from "./i18n/en";
+import zhMessages from "./i18n/zh";
import { Layout } from "./layout";
import AuthProvider from "./config/authProvider";
import DataProvider from "./config/dataProvider";
@@ -27,19 +28,19 @@
DATA_PROVIDER_SPRING,
} from "./config/setting";
import ResourceContent from "./page/ResourceContent";
-import { getSystemInfo } from "@/api/auth";
+import { getSystemInfo, getSystemDicts, tenants } from "@/api/auth";
const i18nProvider = polyglotI18nProvider(
(locale) => {
- if (locale === "zh") {
- return import("./i18n/zh").then((messages) => messages.default);
+ if (locale === "en") {
+ return import("./i18n/en").then((messages) => messages.default);
}
// fallback
- return englishMessages;
+ return zhMessages;
},
// default
// 'en',
- resolveBrowserLocale("en", { fullLocale: true }),
+ resolveBrowserLocale("zh", { fullLocale: true }),
[
{ locale: "en", name: "English" },
{ locale: "zh", name: "绠�浣撲腑鏂�" },
@@ -60,7 +61,10 @@
useEffect(() => {
getSystemInfo().then((data) => {
localStorage.setItem("system", JSON.stringify(data));
- });
+ })
+ getSystemDicts().then(data => {
+ localStorage.setItem('sys_dicts', JSON.stringify(data));
+ })
}, []);
return (
--
Gitblit v1.9.1