From 2f25bd8389c81facd929527a11da2a6dd8d57832 Mon Sep 17 00:00:00 2001 From: youzi <2410633923@qq.com> Date: Tue, 23 Dec 2025 20:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=84=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=A3=B0=E6=98=8E=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=AF=BC=E8=88=AA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 -- src/App.vue | 4 ++-- src/views/Home.vue | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components.d.ts b/components.d.ts index a2317e0..7787b34 100644 --- a/components.d.ts +++ b/components.d.ts @@ -12,11 +12,9 @@ declare module 'vue' { DAside: typeof import('vue-devui/layout/index.es.js')['Aside'] DAvatar: typeof import('vue-devui/avatar/index.es.js')['Avatar'] DButton: typeof import('vue-devui/button/index.es.js')['Button'] - DButtonGroup: typeof import('vue-devui/button-group/index.es.js')['ButtonGroup'] DCard: typeof import('vue-devui/card/index.es.js')['Card'] DContent: typeof import('vue-devui/layout/index.es.js')['Content'] DDropdown: typeof import('vue-devui/dropdown/index.es.js')['Dropdown'] - DDropdownItem: typeof import('vue-devui/dropdown-item/index.es.js')['DropdownItem'] DFooter: typeof import('vue-devui/layout/index.es.js')['Footer'] DForm: typeof import('vue-devui/form/index.es.js')['Form'] DFormItem: typeof import('vue-devui/form/index.es.js')['FormItem'] diff --git a/src/App.vue b/src/App.vue index 4c27895..4d4e90a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,7 +21,7 @@ import layIndex from './Index.vue' // 空白项目入口 const route = useRoute() - +const logStatus = $store.log.useLogStore() const modal = reactive({ visible: false, title: "", @@ -55,7 +55,7 @@ document.oncontextmenu = function () { }; onMounted(() => { - + if($cookies.get('userinfo')) logStatus.setIsLogin(true) }) diff --git a/src/views/Home.vue b/src/views/Home.vue index 99f3dd6..add9666 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -150,6 +150,11 @@ const tagList: any = ref([ const usrLog = $store.log.useLogStore() async function getNavList() { + const userinfo = $cookies.get("userinfo") + if (!userinfo) { + navlist.value = [] + return + } const res = await $http.nav.getNavList() res.data?.forEach((i: any) => { i.icon_error = false