feat(ui): redesign all miniprogram pages

- 全局样式改为粉色(#E6508C)/金色(#DCB982)/绿色(#52c41a)配色
- 所有非tab页使用自定义导航栏,带彩色头部+标题+副标题
- login页: 粉色头部+🌸图标+微信授权登录
- scan页: 粉色头部+虚线扫码框+手动输入按钮
- ble-connect页: 蓝牙提示+搜索中/已发现设备卡片
- bind-success页: 绿色头部+成功图标+7天试用提示卡
- wear-check页: 设备信息行+佩戴指引卡片
- index首页: 粉色设备卡片+开始护理/设备管理按钮
- treatment-setup页: 模式选择+面部地图选区域
- auto-scan页: 面部轮廓+扫描线动画+检测标签
- treating页: 蓝色头部+大倒计时+渐变进度条+放松提示
- treatment-done页: 绿色头部+统计卡片+已记录提示
- subscribe-prompt页: 普通/智能模式对比+试用提示+金色订阅按钮
- subscribe-plans页: 金色头部+服务卡片+月卡/年卡选择
- subscribe-success页: 绿色头部+订阅详情卡+金色按钮
- profile页: 渐变头部+用户行+订阅卡+菜单列表
- history页: 粉色统计行+模式标签记录列表
这个提交包含在:
Guoguo
2026-04-22 21:40:55 +08:00
父节点 a84e37a6e2
当前提交 aa4b215c8b
修改 50 个文件,包含 1535 行新增835 行删除
+14
查看文件
@@ -5,6 +5,8 @@ Page({
data: {
records: [],
total: 0,
totalHours: 0,
monthCount: 0,
page: 1,
pageSize: 20,
loading: true,
@@ -41,18 +43,30 @@ Page({
page: page,
page_size: self.data.pageSize
}).then(function (data) {
var totalMs = 0
var now = new Date()
var monthStart = new Date(now.getFullYear(), now.getMonth(), 1)
var monthCount = 0
var records = (data.records || []).map(function (r) {
var durationMin = Math.floor((r.total_duration_ms || 0) / 60000)
totalMs += (r.total_duration_ms || 0)
r.duration_text = durationMin + '分钟'
r.region_names = ble.getRegionName(r.regions || 0).join('、')
r.wavelength_name = ble.getWavelengthName(r.wavelength || 2)
r.date_text = r.start_time ? r.start_time.slice(0, 10) : ''
if (r.start_time && new Date(r.start_time) >= monthStart) {
monthCount++
}
return r
})
self.setData({
records: refresh ? records : self.data.records.concat(records),
total: data.total || 0,
totalHours: Math.round(totalMs / 3600000),
monthCount: monthCount,
page: page,
loading: false,
loadingMore: false
+3 -1
查看文件
@@ -1,3 +1,5 @@
{
"navigationBarTitleText": "护理记录"
"navigationBarTitleText": "护理记录",
"navigationBarBackgroundColor": "#E6508C",
"navigationBarTextStyle": "white"
}
+30 -18
查看文件
@@ -1,26 +1,38 @@
<view class="container">
<view wx:if="{{loading}}" class="empty-state">
<text class="text-muted">加载中...</text>
<view class="page">
<view class="page-header page-header-pink">
<view class="page-header-title">护理记录</view>
<view class="page-header-subtitle">查看历史护理数据</view>
</view>
<view wx:elif="{{records.length === 0}}" class="empty-state">
<view class="empty-icon">&#128209;</view>
<view class="empty-text">暂无护理记录</view>
</view>
<view wx:else>
<view class="record-count text-muted mb-20">共 {{total}} 条记录</view>
<view wx:for="{{records}}" wx:key="record_id" class="card record-card">
<view class="flex-between mb-10">
<text class="record-date">{{item.date_text}}</text>
<text class="record-duration">{{item.duration_text}}</text>
<view class="page-content">
<view class="stats-row">
<view class="stat-card">
<view class="stat-value">{{total}}</view>
<view class="stat-label">累计次数</view>
</view>
<view class="stat-card">
<view class="stat-value">{{totalHours}}h</view>
<view class="stat-label">累计时长</view>
</view>
<view class="stat-card">
<view class="stat-value">{{monthCount}}</view>
<view class="stat-label">本月次数</view>
</view>
<view class="text-muted record-regions">{{item.region_names}}</view>
</view>
<view wx:if="{{loadingMore}}" class="text-center text-muted mt-20">
加载更多...
<view class="section-title">最近记录</view>
<view class="record-item" wx:for="{{records}}" wx:key="session_id">
<view class="record-date">{{item.date_text}}</view>
<text class="record-mode {{item.mode === 1 ? 'smart' : 'normal'}}">{{item.mode === 1 ? '✨ 智能' : '🔄 普通'}}</text>
<view class="record-details">{{item.duration_text}}</view>
</view>
<view class="empty-state" wx:if="{{!loading && records.length === 0}}">
<text class="empty-icon">📃</text>
<view class="empty-text">暂无护理记录</view>
</view>
<view class="loading-more" wx:if="{{loadingMore}}">加载更多...</view>
</view>
</view>
+83 -11
查看文件
@@ -1,22 +1,94 @@
.record-count {
font-size: 24rpx;
.stats-row {
display: flex;
gap: 16rpx;
margin-bottom: 28rpx;
}
.record-card {
padding: 24rpx 32rpx;
.stat-card {
flex: 1;
background: #f8f8f8;
border-radius: 20rpx;
padding: 20rpx 12rpx;
text-align: center;
}
.stat-value {
font-size: 40rpx;
font-weight: 600;
color: #E6508C;
}
.stat-label {
font-size: 22rpx;
color: #999999;
margin-top: 4rpx;
}
.section-title {
font-size: 28rpx;
font-weight: 600;
color: #333333;
margin-bottom: 20rpx;
}
.record-item {
display: flex;
align-items: center;
padding: 24rpx;
margin-bottom: 12rpx;
background: #ffffff;
border-radius: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.record-date {
font-size: 28rpx;
font-weight: 500;
}
.record-duration {
font-size: 26rpx;
font-weight: 500;
color: #333333;
flex: 1;
}
.record-regions {
.record-mode {
font-size: 20rpx;
padding: 4rpx 14rpx;
border-radius: 12rpx;
}
.record-mode.smart {
background: #fdf2f8;
color: #E6508C;
}
.record-mode.normal {
background: #f0f0f0;
color: #666666;
}
.record-details {
font-size: 22rpx;
color: #999999;
margin-left: 12rpx;
}
.empty-state {
text-align: center;
padding: 120rpx 40rpx;
}
.empty-icon {
font-size: 80rpx;
display: block;
margin-bottom: 16rpx;
}
.empty-text {
color: #999999;
font-size: 28rpx;
}
.loading-more {
text-align: center;
font-size: 24rpx;
margin-top: 4rpx;
color: #999999;
padding: 20rpx 0;
}