From facea208b2fc7c8c7a0d176df06305b866c6520f Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Wed, 17 Jun 2026 08:56:00 +0800
Subject: [PATCH] 中科大支线—申购功能
---
src/layout/components/Sidebar/Logo.vue | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue
index ebaaa8a..5897980 100644
--- a/src/layout/components/Sidebar/Logo.vue
+++ b/src/layout/components/Sidebar/Logo.vue
@@ -1,11 +1,11 @@
<template>
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition name="sidebarLogoFade">
- <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" :to="firstPage">
+ <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" :to="permissionStore.indexPage">
<img v-if="logoImg" :src="logoImg" class="sidebar-logo" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1>
</router-link>
- <router-link v-else key="expand" class="sidebar-logo-link" :to="firstPage">
+ <router-link v-else key="expand" class="sidebar-logo-link" :to="permissionStore.indexPage">
<img v-if="logoImg" :src="logoImg" class="sidebar-logo" />
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1>
</router-link>
@@ -17,6 +17,7 @@
import variables from '@/assets/styles/variables.module.scss'
import logo from '@/assets/logo/logo2.png'
import useSettingsStore from '@/store/modules/settings'
+import usePermissionStore from '@/store/modules/permission'
import {onMounted, ref} from "vue";
import Cookies from "js-cookie";
defineProps({
@@ -28,14 +29,14 @@
const logoImg = ref('')
const firstPage = ref("");
onMounted(() => {
- const routers = JSON.parse(Cookies.get('routers')) ;
- if(routers[0].children){
- firstPage.value = routers[0].path + '/' + routers[0].children[0].path;
- }else {
- firstPage.value = routers[0].path;
- }
-
- console.log(routers,'firstPage.value')
+ // const routers = JSON.parse(Cookies.get('routers')) ;
+ // if(routers[0].children){
+ // firstPage.value = routers[0].path + '/' + routers[0].children[0].path;
+ // }else {
+ // firstPage.value = routers[0].path;
+ // }
+ //
+ // console.log(routers,'firstPage.value')
console.log(firstPage.value,'firstPage.value')
if(Cookies.get('configInfo')){
const config = JSON.parse(Cookies.get('configInfo'))
@@ -50,6 +51,7 @@
});
+const permissionStore = usePermissionStore()
const title = import.meta.env.VITE_APP_TITLE;
const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
--
Gitblit v1.9.2