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 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) 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