From 4cc644945bda98e1ec30828944796ce2fb96e698 Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期五, 21 三月 2025 07:58:59 +0800
Subject: [PATCH] #修改 1. 逻辑分区绑定 2. 物料代码优化
---
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