- 修复购物车数据库缺失 spec_info 字段问题,新增迁移脚本 - 登录页处理手机号授权失败,按错误类型弹窗引导用户改用短信登录 - 登录页新增长期显示的「使用短信验证码登录」入口,提升用户降级体验 - 注册页同步改造,去除微信小程序环境下短信按钮隐藏问题 - 短信登录页整体 UI 重构,弃用 NutUI 组件,采用原生组件实现 - 短信登录页新增渐变背景、浮动光圈、圆形 logo、卡片输入区设计 - 实现手机号输入、验证码发送、倒计时及登录校验逻辑全覆盖 - 短信登录页新增返回微信快捷登录链接,避免用户被困登录流程 - 新增配套样式文件,实现多重动效及分阶段入场动画 - 保证类型检查和编译无误,增加设计稿 HTML 预览文件
333 lines
5.9 KiB
SCSS
333 lines
5.9 KiB
SCSS
// 页面容器
|
|
.page-sms-login {
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
// 背景装饰
|
|
.sms-login-bg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sms-login-bg__gradient {
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
right: -50%;
|
|
bottom: -50%;
|
|
background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
|
|
animation: gradientMove 15s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes gradientMove {
|
|
0%, 100% {
|
|
transform: translate(0, 0) rotate(0deg);
|
|
}
|
|
33% {
|
|
transform: translate(30px, -30px) rotate(120deg);
|
|
}
|
|
66% {
|
|
transform: translate(-20px, 20px) rotate(240deg);
|
|
}
|
|
}
|
|
|
|
.sms-login-bg__circle {
|
|
position: absolute;
|
|
border-radius: 50%;
|
|
opacity: 0.1;
|
|
background: #ffffff;
|
|
animation: float 20s ease-in-out infinite;
|
|
}
|
|
|
|
.sms-login-bg__circle--1 {
|
|
width: 400px;
|
|
height: 400px;
|
|
top: -150px;
|
|
right: -100px;
|
|
animation-delay: 0s;
|
|
}
|
|
|
|
.sms-login-bg__circle--2 {
|
|
width: 300px;
|
|
height: 300px;
|
|
bottom: 10%;
|
|
left: -100px;
|
|
animation-delay: -7s;
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% {
|
|
transform: translate(0, 0) scale(1);
|
|
}
|
|
33% {
|
|
transform: translate(30px, -30px) scale(1.1);
|
|
}
|
|
66% {
|
|
transform: translate(-20px, 20px) scale(0.9);
|
|
}
|
|
}
|
|
|
|
// 内容区域
|
|
.sms-login-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
padding: 0 50px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
// 头部 Logo 和标题
|
|
.sms-login-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding-top: 120px;
|
|
margin-bottom: 60px;
|
|
animation: slideDown 0.8s ease-out;
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.sms-login-logo {
|
|
width: 140px;
|
|
height: 140px;
|
|
border-radius: 35px;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 36px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
animation: logoFloat 3s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes logoFloat {
|
|
0%, 100% {
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
transform: translateY(-8px);
|
|
}
|
|
}
|
|
|
|
.sms-login-logo__icon {
|
|
font-size: 72px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.sms-login-title {
|
|
font-size: 52px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
margin-bottom: 18px;
|
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.sms-login-subtitle {
|
|
font-size: 26px;
|
|
color: rgba(255, 255, 255, 0.85);
|
|
text-align: center;
|
|
}
|
|
|
|
// 表单卡片
|
|
.sms-login-card {
|
|
background: rgba(255, 255, 255, 0.98);
|
|
border-radius: 28px;
|
|
padding: 12px 32px;
|
|
margin-bottom: 48px;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
|
|
animation: slideUp 0.6s ease-out 0.2s both;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.sms-login-field {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 110px;
|
|
position: relative;
|
|
}
|
|
|
|
.sms-login-field--code {
|
|
padding: 0;
|
|
}
|
|
|
|
.sms-login-field__icon-wrap {
|
|
display: flex;
|
|
align-items: center;
|
|
flex: 1;
|
|
min-width: 0;
|
|
height: 100%;
|
|
}
|
|
|
|
.sms-login-field__icon {
|
|
font-size: 36px;
|
|
margin-right: 20px;
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sms-login-field__input {
|
|
flex: 1;
|
|
height: 110px;
|
|
font-size: 30px;
|
|
color: #333333;
|
|
letter-spacing: 1px;
|
|
background: transparent;
|
|
border: none;
|
|
outline: none;
|
|
padding: 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
.sms-login-field__placeholder {
|
|
color: #b8b8b8;
|
|
font-size: 30px;
|
|
}
|
|
|
|
.sms-login-divider {
|
|
height: 1px;
|
|
background: linear-gradient(to right, transparent, #e8e8e8 20%, #e8e8e8 80%, transparent);
|
|
margin: 0 -8px;
|
|
}
|
|
|
|
// 发送验证码按钮
|
|
.sms-login-send {
|
|
flex-shrink: 0;
|
|
height: 64px;
|
|
padding: 0 22px;
|
|
border-radius: 32px;
|
|
background: linear-gradient(135deg, #07c160, #06ad56);
|
|
color: #ffffff;
|
|
font-size: 26px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-left: 16px;
|
|
box-shadow: 0 6px 20px rgba(7, 193, 96, 0.35);
|
|
letter-spacing: 0.5px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.sms-login-send--disabled {
|
|
background: #e0e0e0;
|
|
color: #999999;
|
|
box-shadow: none;
|
|
}
|
|
|
|
// 登录按钮
|
|
.sms-login-submit {
|
|
height: 100px;
|
|
width: 100%;
|
|
border-radius: 50px;
|
|
background: linear-gradient(135deg, #07c160, #06ad56);
|
|
color: #ffffff;
|
|
font-size: 34px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
letter-spacing: 4px;
|
|
box-shadow: 0 12px 36px rgba(7, 193, 96, 0.4);
|
|
margin-bottom: 36px;
|
|
animation: slideUp 0.6s ease-out 0.35s both;
|
|
}
|
|
|
|
.sms-login-submit--disabled {
|
|
background: #b8e0c5;
|
|
color: rgba(255, 255, 255, 0.85);
|
|
box-shadow: 0 4px 12px rgba(7, 193, 96, 0.15);
|
|
}
|
|
|
|
.sms-login-submit--hover {
|
|
transform: scale(0.98);
|
|
opacity: 0.92;
|
|
}
|
|
|
|
// 返回链接
|
|
.sms-login-back {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 80px;
|
|
margin-bottom: 32px;
|
|
animation: fadeIn 0.8s ease-out 0.5s both;
|
|
}
|
|
|
|
.sms-login-back__icon {
|
|
font-size: 30px;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
margin-right: 10px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.sms-login-back__text {
|
|
font-size: 28px;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
text-decoration: underline;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
// 底部协议
|
|
.sms-login-tips {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 0 40px;
|
|
margin-top: auto;
|
|
padding-bottom: 60px;
|
|
animation: fadeIn 0.8s ease-out 0.6s both;
|
|
}
|
|
|
|
.sms-login-tips__text {
|
|
font-size: 22px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.sms-login-tips__link {
|
|
font-size: 22px;
|
|
color: #ffffff;
|
|
text-decoration: underline;
|
|
margin: 0 4px;
|
|
line-height: 1.6;
|
|
}
|