Commit 701cbd20 authored by 张伯涛's avatar 张伯涛

菜单切换404问题修改

parent 9c662a60
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { h, ref, onMounted } from 'vue'; import { h, ref, onMounted } from 'vue';
import { Modal, Segmented } from 'ant-design-vue'; import { Modal, Segmented } from 'ant-design-vue';
import { useI18n } from '@/hooks/web/useI18n'; import { useI18n } from '@/hooks/web/useI18n';
import { useUserStoreWithOut } from '@/store/modules/user'; import {useUserStore, useUserStoreWithOut} from '@/store/modules/user';
import { router } from '@/router'; import { router } from '@/router';
import { import {
editBucketData, editBucketData,
...@@ -82,7 +82,10 @@ ...@@ -82,7 +82,10 @@
async function handleSelect(type, segmentValue) { async function handleSelect(type, segmentValue) {
localStorage.setItem('type', type); localStorage.setItem('type', type);
localStorage.setItem('segmentValue', segmentValue); localStorage.setItem('segmentValue', segmentValue);
await router.replace('/'); // await router.replace('/');
const userStore = useUserStore();
// // 重新获取用户信息和菜单
await userStore.afterLoginAction(true);
window.location.reload(); window.location.reload();
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment