按UI图设计登录页

This commit is contained in:
wangchengming 2025-07-24 16:28:03 +08:00
parent a6ddb0ace6
commit d85788e461
12 changed files with 262 additions and 84 deletions

View File

@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 媒介管理系统
# 开发环境配置 # 开发环境配置
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 若依管理系统/开发环境 # 媒介管理系统/开发环境
VITE_APP_BASE_API = '/dev-api' VITE_APP_BASE_API = '/dev-api'

View File

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 媒介管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 若依管理系统/生产环境 # 媒介管理系统/生产环境
VITE_APP_BASE_API = '/prod-api' VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 媒介管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV = 'staging' VITE_APP_ENV = 'staging'
# 若依管理系统/生产环境 # 媒介管理系统/生产环境
VITE_APP_BASE_API = '/stage-api' VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<title>若依管理系统</title> <title>媒介管理系统</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style> <style>
html, html,

View File

@ -1,7 +1,7 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.9.0", "version": "3.9.0",
"description": "若依管理系统", "description": "媒介管理系统",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -4,7 +4,7 @@
<el-col :sm="24" :lg="12" style="padding-left: 20px"> <el-col :sm="24" :lg="12" style="padding-left: 20px">
<h2>若依后台管理框架</h2> <h2>若依后台管理框架</h2>
<p> <p>
一直想做一款后台管理系统看了很多优秀的开源项目但是发现没有合适自己的于是利用空闲休息时间开始自己写一套后台系统如此有了若依管理系统她可以用于所有的Web应用程序如网站管理后台网站会员中心CMSCRMOA等等当然您也可以对她进行深度定制以做出更强系统所有前端后台代码封装过后十分精简易上手出错概率低同时支持移动客户端访问系统会陆续更新一些实用功能 一直想做一款后台管理系统看了很多优秀的开源项目但是发现没有合适自己的于是利用空闲休息时间开始自己写一套后台系统如此有了媒介管理系统她可以用于所有的Web应用程序如网站管理后台网站会员中心CMSCRMOA等等当然您也可以对她进行深度定制以做出更强系统所有前端后台代码封装过后十分精简易上手出错概率低同时支持移动客户端访问系统会陆续更新一些实用功能
</p> </p>
<p> <p>
<b>当前版本:</b> <span>v{{ version }}</span> <b>当前版本:</b> <span>v{{ version }}</span>

View File

@ -1,54 +1,43 @@
<template> <template>
<div class="login-container">
<div class="loginRoot">
<div class="login"> <div class="login">
<div class="leftLogo">
<div class="left-logo-container">
<img :src="systemLogo" />
<div class="shortBar"></div>
<div class="welcome-message">Welcome to log in and use this system platform</div>
<div class="welcome-label">欢迎登录</div>
</div>
</div>
<div class="rightForm">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">{{ title }}</h3> <div class="title-container">
<div class="tite-square"></div>
<div class="title-label">{{ title }}</div>
</div>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input v-model="loginForm.username" type="text" size="large" class="custom-input" auto-complete="off"
v-model="loginForm.username" placeholder="账号">
type="text"
size="large"
auto-complete="off"
placeholder="账号"
>
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
</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" show-password size="large" class="custom-input"
v-model="loginForm.password" auto-complete="off" placeholder="密码" @keyup.enter="handleLogin">
type="password"
size="large"
auto-complete="off"
placeholder="密码"
@keyup.enter="handleLogin"
>
<template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
</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" size="large" class="custom-input captcha-input" auto-complete="off"
v-model="loginForm.code" placeholder="验证码" @keyup.enter="handleLogin">
size="large"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter="handleLogin"
>
<template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>
</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="large" type="primary" class="myLoginBtn" style="width:100%;"
:loading="loading" @click.prevent="handleLogin">
size="large"
type="primary"
style="width:100%;"
@click.prevent="handleLogin"
>
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
@ -57,9 +46,13 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</div>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <!-- <div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
</div> -->
</div> </div>
</div> </div>
</template> </template>
@ -69,6 +62,7 @@ import { getCodeImg } from "@/api/login"
import Cookies from "js-cookie" import Cookies from "js-cookie"
import { encrypt, decrypt } from "@/utils/jsencrypt" import { encrypt, decrypt } from "@/utils/jsencrypt"
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import systemLogo from '@/assets/images/systemLogo.png'
const title = import.meta.env.VITE_APP_TITLE const title = import.meta.env.VITE_APP_TITLE
const userStore = useUserStore() const userStore = useUserStore()
@ -164,52 +158,235 @@ getCookie()
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.login-container {
position: relative;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("../assets/images/login-background.png");
background-size: cover;
}
.loginRoot {
position: absolute;
top: calc(50% - 290px);
left: calc(50% - 500px);
z-index: 2;
}
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; width: 1000px;
background-image: url("../assets/images/login-background.jpg"); height: 580px;
background-size: cover; border-radius: 6px;
} }
.title {
margin: 0px auto 30px auto; .leftLogo {
width: 500px;
height: 580px;
display: flex;
/* 垂直居中 */
align-items: center;
/* 水平居中(可选) */
justify-content: center;
background-image: url("../assets/images/login-leftBg.png");
background-size: cover;
.left-logo-container {
width: 302px;
height: 154px;
margin: 0 auto;
}
.shortBar {
width: 40px;
height: 6px;
border-radius: 3px 3px 3px 3px;
background: #ffffff;
margin: 10px auto 24px auto;
}
.welcome-message {
margin: 0 auto;
font-family: Arial;
font-weight: 400;
width: 203px;
height: 29px;
font-size: 14px;
text-align: center; text-align: center;
color: #707070; color: #FFFFFF;
}
.welcome-label {
padding-top: 12px;
margin: 0 auto;
font-family: Alibaba PuHuiTi;
font-weight: 400;
width: 66px;
height: 14px;
font-size: 14px;
text-align: center;
color: #FFFFFF;
letter-spacing: 1px;
}
}
.rightForm {
width: 500px;
height: 580px;
display: flex;
/* 垂直居中 */
align-items: center;
background: #ffffff;
}
.tite-square {
width: 10px;
height: 10px;
border-radius: 2px;
background: #ffc63d;
margin: 0px 20px 4px 0;
display: inline-flex;
}
.title-label {
font-family: Alibaba PuHuiTi;
font-weight: 500;
width: 217px;
height: 32px;
font-size: 32px;
text-align: center;
color: #1A75E6;
letter-spacing: 2px;
display: inline-flex;
}
.title-container {
margin: 0px auto 70px auto;
text-align: center;
}
:deep(.el-form-item--default) {
margin-bottom: 20px;
}
:deep(.el-form-item__error) {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
letter-spacing: 1px;
}
:deep(.el-input .el-input__password) {
font-size: 18px;
}
//
.custom-input {
width: 310px;
height: 50px;
border-left: 5px solid #1A75E6;
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
text-align: center;
color: #DCDCDC;
letter-spacing: 1px;
/* Vue 3 方式 */
:deep(.el-input__wrapper.is-focus) {
box-shadow: 0 0 0 1px #A6C9FF inset;
background: #ffffff;
font-family: Arial;
font-weight: 400;
font-size: 18px;
color: #000000;
letter-spacing: 1px;
}
:deep(.el-input__wrapper:hover) {
box-shadow: 0 0 0 1px #A6C9FF inset;
background: #ffffff;
font-family: Arial;
font-weight: 400;
font-size: 18px;
color: #000000;
letter-spacing: 1px;
}
:deep(.el-input__wrapper) {
background: #f7f7f7;
border-radius: 0px;
}
}
.captcha-input {
:deep(.el-input__inner) {
position: absolute;
left: 15px;
width: 170px;
}
} }
.login-form { .login-form {
border-radius: 6px; width: 310px;
background: #ffffff; height: 416px;
width: 400px; margin: 0 auto;
padding: 25px 25px 5px 25px;
z-index: 1; z-index: 1;
.el-input { .el-input {
height: 40px; height: 50px;
--el-input-border-color: transparent;
input { input {
height: 40px; height: 50px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 39px;
width: 14px; width: 18px;
margin-left: 0px; margin-left: 0px;
} }
} }
.login-tip { .login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code { .login-code {
width: 33%; width: 33%;
height: 40px; height: 40px;
float: right; position: absolute;
right: 22px;
z-index: 2;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.myLoginBtn {
width: 310px;
height: 50px;
margin-top: 46px;
border-radius: 25px 25px 25px 25px;
background: #1a75e6;
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 24px;
text-align: center;
color: #FFFFFF;
letter-spacing: 1px;
}
.el-login-footer { .el-login-footer {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
@ -222,6 +399,7 @@ getCookie()
font-size: 12px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
} }
.login-code-img { .login-code-img {
height: 40px; height: 40px;
padding-left: 12px; padding-left: 12px;

View File

@ -2,7 +2,7 @@ import { defineConfig, loadEnv } from 'vite'
import path from 'path' import path from 'path'
import createVitePlugins from './vite/plugins' import createVitePlugins from './vite/plugins'
const baseUrl = 'http://localhost:8080' // 后端接口 const baseUrl = 'http://localhost:8091' // 后端接口
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => { export default defineConfig(({ mode, command }) => {