fix: index page center-aligned layout for device card
这个提交包含在:
@@ -18,18 +18,14 @@
|
|||||||
|
|
||||||
<view class="page-content" wx:if="{{!loading && hasDevice}}">
|
<view class="page-content" wx:if="{{!loading && hasDevice}}">
|
||||||
<view class="device-card">
|
<view class="device-card">
|
||||||
<view class="device-card-top">
|
<view class="device-card-icon">💆</view>
|
||||||
<view class="device-icon">💆</view>
|
<view class="device-card-name">{{deviceName || '光子美容仪'}}</view>
|
||||||
<view class="device-info">
|
<view class="device-card-status">
|
||||||
<view class="device-name">{{deviceName || '我的光面膜'}}</view>
|
|
||||||
<view class="device-meta">
|
|
||||||
<text class="status-badge status-badge-green" wx:if="{{connected}}">已连接</text>
|
<text class="status-badge status-badge-green" wx:if="{{connected}}">已连接</text>
|
||||||
<text class="status-badge" style="background:#ccc;" wx:else>未连接</text>
|
<text class="status-badge" style="background:#ccc;" wx:else>未连接</text>
|
||||||
<text class="device-battery-text" wx:if="{{connected}}">🔋 {{battery}}%</text>
|
<text class="device-card-battery" wx:if="{{connected}}">🔋 {{battery}}%</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<button class="btn-reconnect" bindtap="onConnectBle" wx:if="{{!connected}}">重新连接</button>
|
||||||
</view>
|
|
||||||
<button class="btn-reconnect" bindtap="onConnectBle" wx:if="{{hasDevice && !connected}}">重新连接</button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="sub-info" bindtap="onViewSubscription">
|
<view class="sub-info" bindtap="onViewSubscription">
|
||||||
|
|||||||
@@ -22,38 +22,31 @@
|
|||||||
.device-card {
|
.device-card {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 28rpx;
|
padding: 36rpx 28rpx;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-card-top {
|
.device-card-icon {
|
||||||
display: flex;
|
font-size: 80rpx;
|
||||||
align-items: center;
|
margin-bottom: 12rpx;
|
||||||
gap: 20rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-icon {
|
.device-card-name {
|
||||||
font-size: 64rpx;
|
font-size: 34rpx;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-info {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-name {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.device-card-status {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 16rpx;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-meta {
|
.device-card-battery {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.device-battery-text {
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
@@ -61,7 +54,7 @@
|
|||||||
.btn-reconnect {
|
.btn-reconnect {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 20rpx;
|
margin-top: 24rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
color: #E6508C;
|
color: #E6508C;
|
||||||
@@ -91,6 +84,7 @@
|
|||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-info-left {
|
.sub-info-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -98,9 +92,11 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-info-icon {
|
.sub-info-icon {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-info-arrow {
|
.sub-info-arrow {
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户