feat: 重构sidebar菜单块逻辑

This commit is contained in:
rd
2025-07-07 18:17:31 +08:00
parent 0fe45bb2b3
commit bd4c338f35
11 changed files with 163 additions and 122 deletions

View File

@ -7,8 +7,12 @@
<script setup lang="ts">
import { useUserStore } from '@/stores';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
const userStore = useUserStore();
const enterpriseStore = useEnterpriseStore();
const redTheme = {
token: {
@ -17,10 +21,13 @@ const redTheme = {
},
};
const init = () => {
const init = async () => {
const { isLogin, fetchUserInfo } = userStore;
const { updateEnterpriseInfo } = enterpriseStore;
if (isLogin) {
fetchUserInfo();
await fetchUserInfo();
await updateEnterpriseInfo();
}
};