feat: 重构sidebar菜单块逻辑
This commit is contained in:
11
src/App.vue
11
src/App.vue
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user