- 连接中关闭蓝牙立即结束 loading,不再卡到超时 - onShow 已连接时同步标记,重新搜索不误标已连接设备 - 连接中防重入,搜索中切后台重置状态 - 配网成功立即退出配网模式,密码必填且 8-16 位 - 配网失败重试定时器可清理 - 同名设备改用 deviceId 唯一标识并展示 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
300 lines
5.2 KiB
Plaintext
300 lines
5.2 KiB
Plaintext
/* 连接设备页 —— 三态(idle / searching / found / empty)共用 */
|
|
.connected-device {
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 48rpx 30rpx 0;
|
|
box-sizing: border-box;
|
|
background-color: #ffffff;
|
|
|
|
/* 三层同心圆波纹动画 */
|
|
.ripple {
|
|
position: relative;
|
|
width: 300rpx;
|
|
height: 300rpx;
|
|
margin: 0 auto 48rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
/* 波纹圆环:默认隐藏,仅在 .ripple--active 时播放动画 */
|
|
.ripple-ring {
|
|
position: absolute;
|
|
width: 300rpx;
|
|
height: 300rpx;
|
|
border-radius: 50%;
|
|
background-color: #1385FA;
|
|
opacity: 0;
|
|
}
|
|
|
|
&.ripple--active {
|
|
.ripple-ring {
|
|
animation: ripple-expand 2.4s ease-out infinite;
|
|
}
|
|
|
|
.ripple-ring--delay1 {
|
|
animation-delay: 0.8s;
|
|
}
|
|
|
|
.ripple-ring--delay2 {
|
|
animation-delay: 1.6s;
|
|
}
|
|
}
|
|
|
|
/* 中心实心圆 + 图标 */
|
|
.ripple-core {
|
|
position: relative;
|
|
z-index: 1;
|
|
width: 140rpx;
|
|
height: 140rpx;
|
|
padding: 30rpx;
|
|
box-sizing: border-box;
|
|
border-radius: 50%;
|
|
background-color: #1385FA;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
image {
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes ripple-expand {
|
|
0% {
|
|
transform: scale(0.46);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
color: #252535;
|
|
width: 100%;
|
|
height: 36rpx;
|
|
font-size: 36rpx;
|
|
font-weight: bold;
|
|
line-height: 36rpx;
|
|
text-align: center;
|
|
margin-bottom: 22rpx;
|
|
}
|
|
|
|
.sub-title {
|
|
color: #808080;
|
|
width: 100%;
|
|
height: 30rpx;
|
|
font-size: 30rpx;
|
|
text-align: center;
|
|
line-height: 30rpx;
|
|
margin-bottom: 40rpx;
|
|
}
|
|
|
|
.search-btn {
|
|
color: #FFFFFF;
|
|
width: 580rpx;
|
|
height: 88rpx;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
line-height: 88rpx;
|
|
border-radius: 44rpx;
|
|
margin: 0 auto 32rpx;
|
|
background-color: #1385FA;
|
|
}
|
|
|
|
// .help {
|
|
// width: 100%;
|
|
// height: 30rpx;
|
|
// text-align: center;
|
|
// line-height: 30rpx;
|
|
// margin-bottom: 60rpx;
|
|
|
|
// .help-text {
|
|
// color: #808080;
|
|
// font-size: 30rpx;
|
|
// line-height: 30rpx;
|
|
// margin-right: 8rpx;
|
|
// }
|
|
|
|
// .help-link {
|
|
// color: #1385FA;
|
|
// font-size: 30rpx;
|
|
// line-height: 30rpx;
|
|
// }
|
|
// }
|
|
|
|
.search-device {
|
|
width: 100%;
|
|
|
|
.search-device-header {
|
|
width: 100%;
|
|
height: 32rpx;
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
justify-content: space-between;
|
|
margin-bottom: 38rpx;
|
|
|
|
.search-device-title {
|
|
color: #252535;
|
|
height: 32rpx;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
line-height: 32rpx;
|
|
}
|
|
|
|
.search-device-count {
|
|
height: 32rpx;
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
|
|
.count-text {
|
|
color: #808080;
|
|
height: 32rpx;
|
|
font-size: 28rpx;
|
|
line-height: 32rpx;
|
|
}
|
|
|
|
.count-num {
|
|
color: #1385FA;
|
|
height: 32rpx;
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
line-height: 32rpx;
|
|
padding: 0 6rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.empty {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-top: 160rpx;
|
|
|
|
.empty-image {
|
|
width: 193rpx;
|
|
height: 138rpx;
|
|
margin-bottom: 40rpx;
|
|
background-color: #F5F5F5;
|
|
}
|
|
|
|
.empty-text {
|
|
color: #808080;
|
|
width: 100%;
|
|
height: 30rpx;
|
|
font-size: 30rpx;
|
|
line-height: 30rpx;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
.device-list {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.device-card {
|
|
width: 100%;
|
|
padding: 30rpx;
|
|
border-radius: 16rpx;
|
|
box-sizing: border-box;
|
|
margin-bottom: 24rpx;
|
|
background-color: #FFFFFF;
|
|
border: 2rpx solid #E6E6EA;
|
|
|
|
.device-card-top {
|
|
width: 100%;
|
|
height: 90rpx;
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
align-items: center;
|
|
|
|
.card-icon {
|
|
width: 90rpx;
|
|
height: 90rpx;
|
|
overflow: hidden;
|
|
border-radius: 24rpx;
|
|
margin-right: 24rpx;
|
|
}
|
|
|
|
.card-info {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
|
|
.card-name {
|
|
color: #252535;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
height: 32rpx;
|
|
line-height: 32rpx;
|
|
}
|
|
|
|
.card-status {
|
|
margin-top: 18rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.card-dot {
|
|
width: 12rpx;
|
|
height: 12rpx;
|
|
border-radius: 50%;
|
|
background-color: #2AC79F;
|
|
margin-right: 15rpx;
|
|
}
|
|
|
|
.card-status-text {
|
|
color: #2AC79F;
|
|
height: 28rpx;
|
|
font-size: 28rpx;
|
|
font-weight: 500;
|
|
line-height: 28rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.card-btn-primary {
|
|
color: #FFFFFF;
|
|
font-size: 24rpx;
|
|
font-weight: 500;
|
|
width: 88rpx;
|
|
height: 48rpx;
|
|
line-height: 48rpx;
|
|
text-align: center;
|
|
border-radius: 8rpx;
|
|
background-color: #2AC79F;
|
|
}
|
|
|
|
.card-btn-danger {
|
|
color: #F24439;
|
|
font-size: 24rpx;
|
|
font-weight: 500;
|
|
width: 120rpx;
|
|
height: 48rpx;
|
|
line-height: 44rpx;
|
|
text-align: center;
|
|
border: 2rpx solid #F24439;
|
|
border-radius: 8rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
|
|
.device-card-bottom {
|
|
color: #B6B6B6;
|
|
height: 22rpx;
|
|
font-size: 22rpx;
|
|
font-weight: normal;
|
|
line-height: 22rpx;
|
|
margin-top: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|