登录页和logo变更

This commit is contained in:
砂糖
2025-08-01 09:42:39 +08:00
parent f02967ebbf
commit 4e6f407bb4
4 changed files with 141 additions and 93 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -35,7 +35,7 @@ export default {
}, },
data() { data() {
return { return {
title: 'KLP', title: '科伦普综合办公系统',
logo: logoImg logo: logoImg
} }
} }

View File

@@ -1,62 +1,53 @@
<template> <template>
<div class="login"> <div class="login-page">
<div class="login-left">
<div class="login-logo">
<img src="../assets/logo/logo.png" alt="logo" class="logo-img" />
<div class="login-title">科伦普综合办公系统</div>
</div>
<div class="login-box">
<div class="login-title-welcome">欢迎使用科伦普综合办公系统</div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">科伦普综合办公系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
v-model="loginForm.password" @keyup.enter.native="handleLogin">
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
<el-input <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
v-model="loginForm.code" @keyup.enter.native="handleLogin">
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</div> </div>
</el-form-item> </el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;"> <el-form-item style="width:100%;">
<el-button <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
:loading="loading" @click.native.prevent="handleLogin">
size="medium"
type="primary"
style="width:100%;"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 底部 --> </div>
<div class="el-login-footer"> </div>
<span>Copyright © 2021-2023 KonBAI All Rights Reserved.</span> <div class="login-right">
<div class="login-illustration">
<img src="https://sf3-scmcdn-cn.feishucdn.com/goofy/ee/suite/passport/static/login/img/light.ba71f7a1.png"
alt="illustration" class="illustration-img" />
<div class="login-slogan">
<div class="slogan-title">先进团队先用科伦普</div>
<div class="slogan-desc">信息一处搞定</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@@ -97,7 +88,7 @@ export default {
}, },
watch: { watch: {
$route: { $route: {
handler: function(route) { handler: function (route) {
this.redirect = route.query && route.query.redirect; this.redirect = route.query && route.query.redirect;
}, },
immediate: true immediate: true
@@ -145,7 +136,7 @@ export default {
this.$store.dispatch('category/getProductMap'); this.$store.dispatch('category/getProductMap');
this.$store.dispatch('category/getRawMaterialMap'); this.$store.dispatch('category/getRawMaterialMap');
this.$store.dispatch('category/getBomMap'); this.$store.dispatch('category/getBomMap');
this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); this.$router.push({ path: this.redirect || "/" }).catch(() => { });
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
if (this.captchaEnabled) { if (this.captchaEnabled) {
@@ -160,64 +151,121 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login { .login-page {
display: flex;
height: 100vh;
background: #f7f8fa;
}
.login-logo {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
position: absolute;
top: 24px;
left: 24px;
.logo-img {
width: 64px;
height: 64px;
}
.login-title {
font-size: 22px;
}
}
.login-left {
flex: 2;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; background: #fff;
background-image: url("../assets/images/login-background.jpg"); position: relative;
background-size: cover;
} }
.title {
margin: 0px auto 30px auto; .login-box {
text-align: center; width: 500px;
color: #707070; padding: 40px 32px 32px 32px;
border-radius: 12px;
box-shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.08);
background: #fff;
}
.login-title-welcome {
font-size: 22px;
font-weight: 600;
color: #222;
text-align: left;
margin-bottom: 24px;
} }
.login-form { .login-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; height: 40px;
input { input {
height: 38px; height: 40px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 40px;
width: 14px; width: 16px;
margin-left: 2px; margin-left: 2px;
} }
} }
.login-tip {
.login-footer {
margin-top: 24px;
font-size: 13px; font-size: 13px;
text-align: center; color: #888;
color: #bfbfbf; text-align: left;
} }
.login-code { .login-code {
width: 33%; width: 33%;
height: 38px; height: 40px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.el-login-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img { .login-code-img {
height: 38px; width: 100%;
height: 40px;
}
.login-right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(120deg, #e3eafc 0%, #f7f8fa 100%);
}
.login-illustration {
text-align: center;
}
.illustration-img {
width: 320px;
margin-bottom: 32px;
}
.login-slogan {
.slogan-title {
font-size: 20px;
font-weight: 600;
color: #222;
margin-bottom: 12px;
}
.slogan-desc {
font-size: 15px;
color: #888;
}
} }
</style> </style>