refactor: 忘记密码页面完全重写,匹配登录注册风格
All checks were successful
continuous-integration/drone/push Build is passing

- 去掉旧双面板布局(蓝色横幅+白色卡片)
- 改为居中无卡片暗色极简风格
- 统一渐变背景、Tab 切换、输入框、按钮等样式
- 手机号前缀统一暗色框样式
- 移动端适配
This commit is contained in:
yiqiu
2026-03-19 20:03:00 +08:00
parent 0b845b2075
commit 6450c6dbbd

View File

@@ -1,243 +1,349 @@
/* ============================================
忘记密码页面 — 与登录/注册页统一暗色极简风格
============================================ */
[v-cloak] {
display: none !important;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#forget {
height: 100vh;
width: 100vw;
min-height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background: #0d1117;
background-image:
radial-gradient(ellipse 50% 50% at 0% 0%, rgba(22, 93, 255, 0.12) 0%, transparent 70%),
radial-gradient(ellipse 50% 50% at 100% 0%, rgba(22, 93, 255, 0.08) 0%, transparent 70%),
radial-gradient(ellipse 50% 50% at 100% 100%, rgba(99, 102, 241, 0.08) 0%, transparent 70%),
radial-gradient(ellipse 50% 50% at 0% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}
/* Logo */
.login-logo {
position: fixed;
top: 24px;
left: 32px;
z-index: 20;
}
.login-logo img {
height: 32px;
max-width: 160px;
object-fit: contain;
}
/* ---- 容器 ---- */
.login-container {
width: 15.7rem;
height: 8.2rem;
width: 100%;
max-width: 420px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
padding: 40px 20px;
}
.container-back {
width: 15.7rem;
height: 6.8rem;
background: var(--color-primary);
border-radius: 20px;
overflow: hidden;
position: relative;
font-family: Source Han Sans CN;
}
.container-back .back-text {
font-size: 0.27rem;
z-index: 10;
color: #FFFFFF;
margin-top: 1.39rem;
margin-left: 0.65rem;
font-weight: 400;
}
.container-back .text-welcome {
font-size: 0.74rem;
font-family: Bahnschrift;
line-height: 0.74rem;
}
.container-back .text-title {
margin-top: 5px;
}
.container-back .text-level {
font-size: 0.12rem;
margin-top: 0.81rem;
}
.container-back .back-line1,
.container-back .back-line2,
.container-back .back-line3 {
width: 60px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
z-index: 2;
position: absolute;
}
.container-back .back-line1 {
height: 5rem;
opacity: 1;
transform: rotate(45deg);
top: -1.2rem;
left: 4.15rem;
}
.container-back .back-line2 {
height: 7rem;
transform: rotate(110deg);
top: 0px;
left: 5rem;
}
.container-back .back-line3 {
height: 5rem;
transform: rotate(45deg);
top: 2.3rem;
left: 1.5rem;
}
.container-before {
width: 7.5rem;
height: 8rem;
background: #161b22;
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.1);
position: absolute;
right: 0.9rem;
border: 4px;
z-index: 10;
}
.login {
padding-top: 0.8rem;
padding-left: 1.24rem;
padding-right: 1.05rem;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
line-height: 14px;
}
.login-text {
display: flex;
flex-direction: column;
}
.login-text-title {
font-size: 0.32rem;
color: #E6E8EB;
line-height: 0.32rem;
}
.login-text-regist {
font-weight: Regular;
margin-top: 0.08rem;
color: #E6E8EB;
}
.login-text-regist a {
color: var(--color-primary);
cursor: pointer;
}
.login-form {
margin-top: 0.68rem;
}
.login-top {
display: flex;
flex-direction: row;
}
.login-email,
.login-phone {
height: 0.34rem;
color: #666B80;
cursor: pointer;
}
.login-phone {
margin-left: 0.4rem;
}
.active {
color: var(--color-primary);
border-bottom: 2px solid var(--color-primary);
}
.form-main {
margin-top: 0.3rem;
}
.form-item {
margin-top: 0.3rem;
}
.input-with-select .el-input-group__prepend {
background: #161b22;
width: 60px;
}
.code-item {
display: flex;
flex-direction: row;
}
.code-btn {
margin-left: 0.1rem;
background: var(--color-primary);
color: #FFFFFF;
}
.rember-item {
margin-top: 0.2rem;
display: flex;
justify-content: space-between;
}
.rember-item a {
color: var(--color-primary);
cursor: pointer;
}
.login-btn {
width: 100%;
height: 46px;
background: var(--color-primary);
}
.read-item {
margin-top: 0.2rem;
}
.read-item a {
color: var(--color-primary);
cursor: pointer;
}
.line-item {
margin-top: 0.4rem;
}
.line-item text {
font-size: 16px;
color: #E6E8EB;
}
.type-btn {
width: 100%;
height: 0.46rem;
font-size: 0.16rem;
}
@media screen and (max-width: 750px) {
.login-container {
height: calc(100vh - 1.2rem);
width: 100vw;
background: #F2F2FE;
padding: 0.6rem 0;
}
/* 隐藏左侧装饰 */
.container-back {
display: none;
}
/* 顶部按钮区 */
.login-jump-btn {
position: fixed;
top: 24px;
right: 24px;
z-index: 20;
display: flex;
align-items: center;
gap: 12px;
}
.login-jump-btn .btn {
background: rgba(22, 93, 255, 0.1) !important;
border: 1px solid rgba(22, 93, 255, 0.25) !important;
color: #165DFF !important;
border-radius: 6px;
font-size: 13px;
}
.login-jump-btn .btn a {
color: inherit;
text-decoration: none;
}
/* ---- 表单区域 — 无卡片 ---- */
.container-before {
width: 100%;
height: 100%;
margin: 0rem 0.3rem;
position: unset;
z-index: 0;
position: static;
background: transparent;
box-shadow: none;
border: none;
}
.login {
padding-top: 1.17rem;
padding-left: 0.3rem;
padding-right: 0.3rem;
font-size: 0.26rem;
line-height: 0.3rem;
padding: 0;
font-size: 14px;
font-family: PingFang SC, -apple-system, sans-serif;
}
/* 标题 */
.login-text {
text-align: center;
margin-bottom: 32px;
}
.login-text-title {
font-size: 0.4rem;
font-size: 28px;
font-weight: 700;
color: #FFFFFF;
line-height: 1.3;
}
.login-text-regist {
margin-top: 0.1rem;
font-size: 0.28rem;
margin-top: 10px;
color: #8B949E;
font-size: 14px;
line-height: 1;
}
.login-text-regist a {
color: #165DFF;
cursor: pointer;
text-decoration: none;
margin-left: 4px;
}
.login-text-regist a:hover {
text-decoration: underline;
}
/* ---- 邮箱/手机切换 Tab ---- */
.login-form {
margin-top: 1.21rem;
margin-top: 24px;
}
.login-top {
display: flex;
gap: 0;
margin-bottom: 20px;
background: rgba(255, 255, 255, 0.03);
border-radius: 8px;
padding: 3px;
border: 1px solid rgba(255, 255, 255, 0.04);
}
.login-email,
.login-phone {
height: 0.34rem;
width: 100%;
flex: 1;
height: 36px;
line-height: 36px;
text-align: center;
color: #666B80;
border-radius: 6px;
font-size: 14px;
color: #8B949E;
cursor: pointer;
padding-bottom: 0.13rem;
}
.el-checkbox__label {
font-size: 0.26rem;
}
.read-item {
line-height: 0.3rem;
}
.login-btn {
font-size: 0.34rem;
height: 0.8rem;
}
.type-btn {
transition: all 0.2s;
border: none;
color: var(--color-primary);
font-size: 0.34rem;
}
.login-email:hover,
.login-phone:hover {
color: #E6E8EB;
}
.login-email.active,
.login-phone.active {
background: rgba(22, 93, 255, 0.15);
color: #FFFFFF;
font-weight: 500;
border: none;
border-bottom: none;
}
/* ---- 表单 ---- */
.form-main {
margin-top: 0;
}
.form-item {
margin-top: 16px;
}
.form-item:first-child {
margin-top: 0;
}
.form-main .el-input__inner {
height: 46px;
background: #1c2028 !important;
border: 1px solid rgba(255, 255, 255, 0.06) !important;
border-radius: 8px !important;
color: #E6E8EB !important;
font-size: 14px;
transition: border-color 0.2s;
}
.form-main .el-input__inner:hover {
border-color: rgba(22, 93, 255, 0.2) !important;
}
.form-main .el-input__inner:focus {
border-color: #165DFF !important;
box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.15) !important;
}
.form-main .el-input__inner::placeholder {
color: rgba(139, 148, 158, 0.5) !important;
}
/* 手机号前缀 — 统一暗色框 */
.input-with-select .el-input-group__prepend {
background: #1c2028 !important;
border: none !important;
border-radius: 8px 0 0 8px !important;
color: #E6E8EB !important;
padding: 0 !important;
width: 80px !important;
}
.input-with-select.el-input-group {
background: #1c2028 !important;
border-radius: 8px !important;
border: 1px solid rgba(255,255,255,0.06) !important;
transition: border-color 0.2s;
}
.input-with-select.el-input-group:hover {
border-color: rgba(22, 93, 255, 0.2) !important;
}
.input-with-select.el-input-group .el-input__inner {
background: transparent !important;
border: none !important;
}
.input-with-select .el-input-group__prepend .el-select {
width: 100% !important;
margin: 0 !important;
}
.input-with-select .el-input-group__prepend .el-input__inner {
background: transparent !important;
border: none !important;
color: #E6E8EB !important;
padding-left: 14px !important;
padding-right: 22px !important;
}
.input-with-select .el-input-group__prepend .el-input__suffix {
color: rgba(139, 148, 158, 0.4) !important;
right: 2px !important;
}
/* 验证码 */
.code-item {
display: flex;
gap: 10px;
}
.code-btn {
margin-left: 0 !important;
min-width: 110px;
height: 46px !important;
background: rgba(22, 93, 255, 0.12) !important;
border: 1px solid rgba(22, 93, 255, 0.25) !important;
border-radius: 8px !important;
color: #165DFF !important;
font-size: 13px !important;
white-space: nowrap;
transition: all 0.2s;
}
.code-btn:hover {
background: rgba(22, 93, 255, 0.2) !important;
}
/* 协议与提示 */
.read-item {
margin-top: 16px;
}
.read-item a {
color: #165DFF;
cursor: pointer;
text-decoration: none;
}
.read-item a:hover {
text-decoration: underline;
}
.el-checkbox__label {
color: #8B949E !important;
font-size: 13px;
}
/* 登录按钮 */
.login-btn {
width: 100% !important;
height: 46px !important;
background: #165DFF !important;
border: none !important;
border-radius: 8px !important;
font-size: 15px !important;
font-weight: 500 !important;
color: #FFFFFF !important;
letter-spacing: 1px;
transition: background 0.2s;
margin-top: 8px;
}
.login-btn:hover {
background: #0E42D2 !important;
}
/* ---- 移动端适配 ---- */
@media screen and (max-width: 750px) {
.login-container {
width: 100%;
max-width: 100%;
padding: 80px 24px 40px;
}
.container-back {
display: none;
}
.container-before {
width: 100%;
position: static;
background: transparent;
box-shadow: none;
}
.login {
padding: 0;
}
.login-text-title {
font-size: 24px;
}
.login-text-regist {
font-size: 13px;
}
.login-btn {
height: 46px !important;
font-size: 15px !important;
}
}