From c8e75c275c57a4b6f858ad777eee344b91220dc4 Mon Sep 17 00:00:00 2001
From: ali <ali9696@163.com>
Date: 星期四, 09 一月 2025 18:14:58 +0800
Subject: [PATCH] systemInfo.copyRight

---
 zhitan-vue/src/views/login.vue                    |   26 ++++++++++++++++++--------
 zhitan-vue/src/layout/components/Sidebar/Logo.vue |   12 ++++++------
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/zhitan-vue/src/layout/components/Sidebar/Logo.vue b/zhitan-vue/src/layout/components/Sidebar/Logo.vue
index 9fe31c0..6cabb17 100644
--- a/zhitan-vue/src/layout/components/Sidebar/Logo.vue
+++ b/zhitan-vue/src/layout/components/Sidebar/Logo.vue
@@ -14,9 +14,9 @@
         <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1>
       </router-link>
     </transition> -->
-    <div class="logo">
-      <img v-if="sideTheme === 'theme-dark'" :src="logo" class="sidebar-logo" />
-      <img v-else :src="logo2" class="sidebar-logo" />
+    <div class="logo" v-if="systemInfo && systemInfo.leftLogo">
+      <img v-if="sideTheme === 'theme-dark'" :src="systemInfo.leftLogo" class="sidebar-logo" />
+      <img v-else :src="systemInfo.leftLogo" class="sidebar-logo" />
     </div>
 
     <div class="name" v-if="!collapse" :style="{ color: sideTheme === 'theme-dark' ? '#fff' : '#487FEE' }">
@@ -40,7 +40,7 @@
   },
 })
 
-const title = import.meta.env.VITE_APP_TITLE
+const title = systemInfo.systemName || import.meta.env.VITE_APP_TITLE
 const settingsStore = useSettingsStore()
 const sideTheme = computed(() => settingsStore.sideTheme)
 </script>
@@ -68,8 +68,8 @@
   margin-top: 24px;
   margin-bottom: 15px;
   .logo {
-    width: 87px;
-    height: 30px;
+    width: 40px;
+    height: 40px;
     margin-left: 13px;
     .sidebar-logo {
       width: 100%;
diff --git a/zhitan-vue/src/views/login.vue b/zhitan-vue/src/views/login.vue
index 955060f..7308664 100644
--- a/zhitan-vue/src/views/login.vue
+++ b/zhitan-vue/src/views/login.vue
@@ -1,11 +1,12 @@
 <template>
   <div class="login">
-    <div
-      class="login-logo"
+    <!-- <div
+      class="login-logo-bg"
       v-if="systemInfo && systemInfo.homeLogo"
       :style="{ backgroundImage: 'url(' + systemInfo.homeLogo + ')', backgroundSize: '100% 100%' }"
-    ></div>
-    <div class="login-font" v-else>鑳芥簮绯荤粺</div>
+    ></div> -->
+    <img v-if="systemInfo && systemInfo.homeLogo" :src="systemInfo.homeLogo" alt="" class="login-logo-img" />
+    <div class="login-font" v-else>{{ systemInfo.systemName || "鑳芥簮绠$悊绯荤粺" }}</div>
     <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
       <!-- <h3 class="title">鍏呯數妗╁悗鍙扮鐞嗙郴缁�</h3> -->
       <el-form-item prop="username">
@@ -58,7 +59,8 @@
     </el-form>
     <!--  搴曢儴  -->
     <div class="el-login-footer">
-      <span>Copyright 漏 2021-2024 ZhiTanCloud All Rights Reserved.</span>
+      <!-- <span>Copyright 漏 2021-2024 ZhiTanCloud All Rights Reserved.</span> -->
+      <span>{{ systemInfo.copyRight || "Copyright 漏 2017-2024 ZhiTanCloud All Rights Reserved." }}</span>
     </div>
   </div>
 </template>
@@ -73,9 +75,8 @@
 const route = useRoute()
 const router = useRouter()
 const { proxy } = getCurrentInstance()
-const systemInfo = JSON.parse(Cookies.get("SystemInfo"))
+const systemInfo = JSON.parse(Cookies.get("SystemInfo") || "{}")
 
-console.log(systemInfo)
 const loginForm = ref({
   username: "admin",
   password: "admin123",
@@ -249,7 +250,7 @@
   padding-left: 12px;
 }
 
-.login-logo {
+.login-logo-bg {
   width: 514px;
   height: 177px;
   // background-image: url('@/assets/images/login-logo.png');
@@ -259,6 +260,15 @@
   top: 22%;
   transform: translate(-50%, -50%);
 }
+.login-logo-img {
+  // width: 100%;
+  // height: 100%;
+  // transform: translate(-50%, -50%);
+  max-height: 200px;
+  margin: 0 auto;
+  position: absolute;
+  top: 17%;
+}
 
 .login-font {
   font-size: 50px;

--
Gitblit v1.9.3