From fda403d6a96bb0415a98c8fa3b7f69c5343e6d1b Mon Sep 17 00:00:00 2001 From: Guoguo Date: Mon, 18 May 2026 05:57:47 -0700 Subject: [PATCH] fix: index page center-aligned layout for device card --- miniprogram/pages/index/index.wxml | 18 +++++------- miniprogram/pages/index/index.wxss | 44 ++++++++++++++---------------- 2 files changed, 27 insertions(+), 35 deletions(-) diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index 97b9c01..f67e3cf 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -18,18 +18,14 @@ - - 💆 - - {{deviceName || '我的光面膜'}} - - 已连接 - 未连接 - 🔋 {{battery}}% - - + 💆 + {{deviceName || '光子美容仪'}} + + 已连接 + 未连接 + 🔋 {{battery}}% - + diff --git a/miniprogram/pages/index/index.wxss b/miniprogram/pages/index/index.wxss index accaf34..3d78073 100644 --- a/miniprogram/pages/index/index.wxss +++ b/miniprogram/pages/index/index.wxss @@ -22,38 +22,31 @@ .device-card { background: #fff; border-radius: 16rpx; - padding: 28rpx; + padding: 36rpx 28rpx; + text-align: center; } -.device-card-top { - display: flex; - align-items: center; - gap: 20rpx; +.device-card-icon { + font-size: 80rpx; + margin-bottom: 12rpx; } -.device-icon { - font-size: 64rpx; - flex-shrink: 0; -} - -.device-info { - flex: 1; -} - -.device-name { - font-size: 32rpx; +.device-card-name { + font-size: 34rpx; font-weight: 600; color: #333; + margin-bottom: 16rpx; +} + +.device-card-status { + display: flex; + align-items: center; + justify-content: center; + gap: 16rpx; margin-bottom: 8rpx; } -.device-meta { - display: flex; - align-items: center; - gap: 16rpx; -} - -.device-battery-text { +.device-card-battery { font-size: 24rpx; color: #666; } @@ -61,7 +54,7 @@ .btn-reconnect { display: block; width: 100%; - margin-top: 20rpx; + margin-top: 24rpx; padding: 20rpx; background: #f5f5f5; color: #E6508C; @@ -91,6 +84,7 @@ padding: 24rpx; margin-top: 20rpx; } + .sub-info-left { display: flex; align-items: center; @@ -98,9 +92,11 @@ font-size: 28rpx; color: #333; } + .sub-info-icon { font-size: 32rpx; } + .sub-info-arrow { color: #999; font-size: 32rpx;