From e4caa19acec18e69b209ee41c88c5824521c9416 Mon Sep 17 00:00:00 2001 From: DYL0109 <1332079466@qq.com> Date: 星期一, 20 一月 2025 17:46:58 +0800 Subject: [PATCH] !28 解决bug Merge pull request !28 from DYL0109/develop1.0 --- zhitan-vue/src/views/login.vue | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/zhitan-vue/src/views/login.vue b/zhitan-vue/src/views/login.vue index 955060f..86d243f 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"> @@ -20,6 +21,7 @@ size="large" auto-complete="off" placeholder="瀵嗙爜" + show-password @keyup.enter="handleLogin" > <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template> @@ -58,7 +60,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 +76,9 @@ 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 +252,7 @@ padding-left: 12px; } -.login-logo { +.login-logo-bg { width: 514px; height: 177px; // background-image: url('@/assets/images/login-logo.png'); @@ -259,6 +262,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