优化banner逻辑
This commit is contained in:
@@ -13,6 +13,7 @@ import MessagePageContent from "./components/MessagePageContent";
|
||||
import MyselfPageContent from "./components/MyselfPageContent";
|
||||
import "./index.scss";
|
||||
import FamilyContext from "@/context";
|
||||
import { useDictionaryStore } from "@/store/dictionaryStore";
|
||||
|
||||
type TabType = "list" | "message" | "personal";
|
||||
|
||||
@@ -66,6 +67,12 @@ const MainPage: React.FC = () => {
|
||||
try {
|
||||
await fetchUserInfo();
|
||||
await checkNicknameChangeStatus();
|
||||
// 启动时预取 Banner 字典(与业务无强依赖,失败不影响主流程)
|
||||
try {
|
||||
await useDictionaryStore.getState().fetchBannerDictionary();
|
||||
} catch (e) {
|
||||
console.error("预取 Banner 字典失败:", e);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取用户信息失败:", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user