From 6f3f068606f1f18ce859def1b6960571fd742605 Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期四, 20 三月 2025 08:59:19 +0800
Subject: [PATCH] #新增 1. 物料保存扩展字段优化
---
rsf-admin/src/App.jsx | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/rsf-admin/src/App.jsx b/rsf-admin/src/App.jsx
index 3dd8939..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, getSystemDicts } 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: "绠�浣撲腑鏂�" },
@@ -61,6 +62,9 @@
getSystemInfo().then((data) => {
localStorage.setItem("system", JSON.stringify(data));
})
+ getSystemDicts().then(data => {
+ localStorage.setItem('sys_dicts', JSON.stringify(data));
+ })
}, []);
return (
--
Gitblit v1.9.1