From 9b541b54b45065703e14bdd4f413e8a58ea2ac9c Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Fri, 9 Jan 2026 00:22:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=BF=83=E8=B7=AF?= =?UTF-8?q?=E5=8E=86=E7=A8=8Bbug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/invest/heartJourney/index.vue | 5 +- src/views/register.vue | 359 +++++++++++++++++++----- 2 files changed, 287 insertions(+), 77 deletions(-) diff --git a/src/views/invest/heartJourney/index.vue b/src/views/invest/heartJourney/index.vue index 7827795..5651ee7 100644 --- a/src/views/invest/heartJourney/index.vue +++ b/src/views/invest/heartJourney/index.vue @@ -226,9 +226,12 @@ const handleView = (row) => { /** 新增按钮操作 */ function handleAdd() { reset() - form.value.createTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss') open.value = true title.value = '添加心路历程' + // 确保表单完全清空后再设置默认时间 + nextTick(() => { + form.value.createTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss') + }) } /** 修改按钮操作 */ diff --git a/src/views/register.vue b/src/views/register.vue index f1038c5..71d102b 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -1,43 +1,65 @@ @@ -131,61 +153,246 @@ getCode() display: flex; justify-content: center; align-items: center; - height: 100%; - // background-image: url('../assets/images/login-background.jpg'); - background-size: cover; + min-height: 100vh; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + position: relative; + overflow: hidden; + + // 科技感背景动画 + &::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px); + background-size: 50px 50px; + animation: gridMove 20s linear infinite; + } } -.title { - margin: 0px auto 30px auto; + +@keyframes gridMove { + 0% { + transform: translate(0, 0); + } + 100% { + transform: translate(50px, 50px); + } +} + +.register-container { + position: relative; + z-index: 1; +} + +.register-form-wrapper { + background: rgba(255, 255, 255, 0.95); + backdrop-filter: blur(20px); + border-radius: 20px; + padding: 50px 45px; + width: 460px; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1); + transition: all 0.3s ease; + + &:hover { + transform: translateY(-5px); + box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15); + } +} + +.form-header { text-align: center; - color: #707070; + margin-bottom: 40px; + + .title { + margin: 0; + font-size: 32px; + font-weight: 800; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + letter-spacing: 1px; + } + + .subtitle { + margin: 12px 0 0 0; + font-size: 14px; + color: #999; + font-weight: 400; + } } .register-form { - border-radius: 6px; - background: #ffffff; - width: 400px; - padding: 25px 25px 5px 25px; - .el-input { - height: 40px; - input { - height: 40px; + :deep(.el-form-item) { + margin-bottom: 24px; + } + + :deep(.el-input__wrapper) { + height: 52px; + border-radius: 12px; + border: 2px solid #e8e8e8; + background: #fafafa; + transition: all 0.3s ease; + box-shadow: none; + + &:hover { + border-color: #667eea; + background: #ffffff; + } + + &.is-focus { + border-color: #667eea; + background: #ffffff; + box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1); } } + + :deep(.el-input__inner) { + font-size: 15px; + color: #333; + + &::placeholder { + color: #bbb; + font-weight: 400; + } + } + + :deep(.el-input__icon) { + font-size: 18px; + color: #999; + } + .input-icon { - height: 39px; - width: 14px; - margin-left: 0px; + width: 18px; + height: 18px; } } -.register-tip { - font-size: 13px; - text-align: center; - color: #bfbfbf; + +// 验证码区域 +.code-item { + :deep(.el-form-item__content) { + display: flex; + gap: 12px; + + .el-input { + flex: 1; + } + } } + .register-code { - width: 33%; - height: 40px; - float: right; - img { + width: 120px; + height: 52px; + flex-shrink: 0; + + .register-code-img { + width: 100%; + height: 100%; + border-radius: 12px; cursor: pointer; - vertical-align: middle; + transition: all 0.3s ease; + border: 2px solid #e8e8e8; + + &:hover { + border-color: #667eea; + transform: scale(1.05); + } } } -.el-register-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; + +// 提交按钮 +.submit-item { + margin-top: 35px; + margin-bottom: 20px; + + .register-btn { + width: 100%; + height: 52px; + border-radius: 12px; + font-size: 16px; + font-weight: 600; + letter-spacing: 2px; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border: none; + box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35); + transition: all 0.3s ease; + + &:hover { + transform: translateY(-2px); + box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5); + } + + &:active { + transform: translateY(0); + } + } } -.register-code-img { - height: 40px; - padding-left: 12px; + +// 登录链接 +.login-link { + text-align: center; + margin-top: 20px; + + .link-text { + color: #999; + font-size: 14px; + margin-right: 8px; + } + + .link-type { + font-size: 14px; + font-weight: 600; + color: #667eea; + position: relative; + padding-bottom: 2px; + text-decoration: none; + + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 0; + height: 2px; + background: linear-gradient(90deg, #667eea, #764ba2); + transition: width 0.3s ease; + } + + &:hover { + color: #764ba2; + + &::after { + width: 100%; + } + } + } +} + +// 底部版权 +.el-register-footer { + position: fixed; + bottom: 20px; + left: 0; + right: 0; + text-align: center; + color: rgba(255, 255, 255, 0.8); + font-size: 13px; + letter-spacing: 1px; + z-index: 2; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +// 响应式优化 +@media (max-width: 768px) { + .register-form-wrapper { + width: 90%; + padding: 40px 30px; + } + + .form-header .title { + font-size: 26px; + } }