zhangwei
8 天以前 3324a54fa4d0840f8a5dc8adb21753180ecd3f3c
src/layout/hooks/useNav.ts
@@ -15,6 +15,7 @@
import ExitFullscreen from "~icons/ri/fullscreen-exit-fill";
import Fullscreen from "~icons/ri/fullscreen-fill";
import { unref } from "vue";
import { message } from "@/utils/message";
const errorInfo =
  "The current routing configuration is incorrect, please check the configuration";
@@ -52,7 +53,7 @@
      : useUserStoreHook()?.nickname;
  });
  /** 角色 */
  /** 当前角色 */
  const userRoles = computed(() => {
    return useUserStoreHook()?.nowRole;
  });
@@ -107,8 +108,13 @@
      .then(res => {
        if (res.code == 200) {
          // 获取后端路由
          initRouter();
          onFresh();
          initRouter().then(() => {
            const path = getTopMenu(true);
            router.push({ name: path.name });
          });
          // onFresh();
        } else {
          message(res?.message, { type: "warning" });
        }
      });
  };