fix(ui): polish miniprogram and admin console details
小程序修复: - 首页/我的/记录页移除自定义头部,使用原生导航栏 - tabBar '护理记录' 改为 '记录' - 智能模式跳转auto-scan页面(不再跳过) - 扫码区域尺寸 300→360rpx,图标 100→120rpx - 护理中倒计时 120→144rpx - 完成页图标 120→140rpx - 完成页时长格式 '10分0秒' → '10分钟' - 蓝牙连接 '连接中' → '点击连接' - 订阅套餐默认选中年卡 - 订阅成功页改为动态数据(非硬编码) - 我的页增加退出登录按钮 - 护理记录日期支持'今天/昨天'相对格式 - 扫描进度居中 - 锁定模式图标加灰度滤镜 管理后台修复: - 所有页面移除重复页面标题 - 仪表盘统计卡片改为垂直布局 - 快捷操作图标统一粉色+箭头 - 设备管理搜索placeholder和库存badge修正 - 用户管理头像、次后缀、月卡/试用badge颜色修正 - 订阅管理stat背景改白色、过期改红色、tab切换修复 - 护理记录模式badge修正 - 操作日志改为平铺列表 - 系统设置开关改绿色、表单改水平布局 - 全局背景色 #f5f5f5 → #f0f2f5
这个提交包含在:
+1
-1
@@ -34,7 +34,7 @@
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/history/history",
|
||||
"text": "护理记录"
|
||||
"text": "记录"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/profile/profile",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
border-radius: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #006699;
|
||||
display: inline-block;
|
||||
width: fit-content;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="found-card" wx:if="{{state === 'binding'}}">
|
||||
<view class="found-icon">💆</view>
|
||||
<view class="found-name">光子美容仪-{{deviceId}}</view>
|
||||
<view class="status-badge status-badge-green">连接中</view>
|
||||
<text class="status-badge status-badge-green">点击连接</text>
|
||||
</view>
|
||||
|
||||
<view class="found-card" wx:if="{{state === 'error'}}">
|
||||
|
||||
@@ -54,7 +54,7 @@ Page({
|
||||
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) : ''
|
||||
r.date_text = self.formatDate(r.start_time)
|
||||
|
||||
if (r.start_time && new Date(r.start_time) >= monthStart) {
|
||||
monthCount++
|
||||
@@ -74,5 +74,19 @@ Page({
|
||||
}).catch(function () {
|
||||
self.setData({ loading: false, loadingMore: false })
|
||||
})
|
||||
},
|
||||
|
||||
formatDate: function (dateStr) {
|
||||
if (!dateStr) return ''
|
||||
var d = new Date(dateStr)
|
||||
var now = new Date()
|
||||
var today = new Date(now.getFullYear(), now.getMonth(), now.getDate())
|
||||
var yesterday = new Date(today.getTime() - 86400000)
|
||||
var h = ('0' + d.getHours()).slice(-2)
|
||||
var m = ('0' + d.getMinutes()).slice(-2)
|
||||
|
||||
if (d >= today) return '今天 ' + h + ':' + m
|
||||
if (d >= yesterday) return '昨天 ' + h + ':' + m
|
||||
return (d.getMonth() + 1) + '月' + d.getDate() + '日 ' + h + ':' + m
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
<view class="page">
|
||||
<view class="page-header page-header-pink">
|
||||
<view class="page-header-title">护理记录</view>
|
||||
<view class="page-header-subtitle">查看历史护理数据</view>
|
||||
</view>
|
||||
|
||||
<view class="page-content">
|
||||
<view class="stats-row">
|
||||
<view class="stat-card">
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
<view class="page">
|
||||
<view class="page-header page-header-pink">
|
||||
<view class="page-header-title">首页</view>
|
||||
<view class="page-header-subtitle">光子美容仪</view>
|
||||
</view>
|
||||
|
||||
<view class="page-content" wx:if="{{!hasDevice}}">
|
||||
<view class="empty-device">
|
||||
<text class="empty-icon">📱</text>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"navigationBarBackgroundColor": "#E6508C",
|
||||
"navigationBarBackgroundGradient": "linear-gradient(135deg, #E6508C 0%, #DCB982 100%)",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<view class="page">
|
||||
<view class="page-header page-header-gradient">
|
||||
<view class="page-header-title">我的</view>
|
||||
</view>
|
||||
|
||||
<view class="page-content">
|
||||
<view class="user-row">
|
||||
<view class="user-avatar">👤</view>
|
||||
@@ -47,5 +43,7 @@
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="logout-btn" bindtap="onLogout">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -97,3 +97,13 @@
|
||||
color: #cccccc;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
text-align: center;
|
||||
color: #ff4d4f;
|
||||
font-size: 28rpx;
|
||||
margin-top: 32rpx;
|
||||
padding: 24rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.scan-area {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
margin: 40rpx auto;
|
||||
border: 6rpx dashed #E6508C;
|
||||
border-radius: 24rpx;
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
.scan-icon {
|
||||
font-size: 100rpx;
|
||||
font-size: 120rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Page({
|
||||
{ plan: 'monthly', price: '¥99', desc: '约3.3元/天' },
|
||||
{ plan: 'yearly', price: '¥899', desc: '省¥289' }
|
||||
],
|
||||
selected: null,
|
||||
selected: 'yearly',
|
||||
purchasing: false
|
||||
},
|
||||
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
Page({
|
||||
data: {},
|
||||
data: {
|
||||
planName: '年卡会员',
|
||||
expiryDate: ''
|
||||
},
|
||||
|
||||
onLoad: function () {
|
||||
var now = new Date()
|
||||
now.setFullYear(now.getFullYear() + 1)
|
||||
var y = now.getFullYear()
|
||||
var m = ('0' + (now.getMonth() + 1)).slice(-2)
|
||||
var d = ('0' + now.getDate()).slice(-2)
|
||||
this.setData({ expiryDate: y + '年' + m + '月' + d + '日' })
|
||||
},
|
||||
|
||||
onStartSmart: function () {
|
||||
wx.navigateTo({ url: '/pages/treatment-setup/treatment-setup' })
|
||||
wx.navigateTo({ url: '/pages/wear-check/wear-check' })
|
||||
},
|
||||
|
||||
onBackHome: function () {
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
<view class="sub-card">
|
||||
<view class="sub-header">
|
||||
<text class="sub-name">✨ 年卡会员</text>
|
||||
<text class="sub-name">✨ {{planName}}</text>
|
||||
<text class="sub-status status-badge status-badge-green">已订阅</text>
|
||||
</view>
|
||||
<view class="sub-info">有效期至:2027年4月8日</view>
|
||||
<view class="sub-info">有效期至:{{expiryDate}}</view>
|
||||
</view>
|
||||
|
||||
<button class="btn-primary btn-primary-gold" bindtap="onStartSmart">立即体验智能模式</button>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}
|
||||
|
||||
.countdown-time {
|
||||
font-size: 120rpx;
|
||||
font-size: 144rpx;
|
||||
font-weight: 700;
|
||||
color: #E6508C;
|
||||
display: block;
|
||||
|
||||
@@ -19,12 +19,19 @@ Page({
|
||||
var mins = Math.floor(durationMs / 60000)
|
||||
var secs = Math.floor((durationMs % 60000) / 1000)
|
||||
|
||||
var durationText = ''
|
||||
if (mins > 0) {
|
||||
durationText = mins + '分钟'
|
||||
} else {
|
||||
durationText = secs + '秒'
|
||||
}
|
||||
|
||||
this.setData({
|
||||
sessionId: options.session_id || '',
|
||||
regions: parseInt(options.regions) || 0,
|
||||
duration: durationMs,
|
||||
avgPd: options.avg_pd || 0,
|
||||
durationText: mins + '分' + secs + '秒',
|
||||
durationText: durationText,
|
||||
regionNames: ble.getRegionName(parseInt(options.regions) || 0)
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.result-icon {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
background: #52c41a;
|
||||
border-radius: 50%;
|
||||
margin: 24rpx auto 20rpx;
|
||||
@@ -8,7 +8,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
font-size: 60rpx;
|
||||
font-size: 64rpx;
|
||||
}
|
||||
|
||||
.result-title {
|
||||
|
||||
@@ -61,6 +61,12 @@ Page({
|
||||
|
||||
self.setData({ submitting: true, error: '' })
|
||||
|
||||
if (self.data.selectedMode === 1) {
|
||||
self.setData({ submitting: false })
|
||||
wx.navigateTo({ url: '/pages/auto-scan/auto-scan' })
|
||||
return
|
||||
}
|
||||
|
||||
ble.setParams({
|
||||
region_mask: mask,
|
||||
wavelength: 2,
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.mode-option.locked .mode-icon {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.mode-icon {
|
||||
font-size: 48rpx;
|
||||
display: block;
|
||||
|
||||
在新工单中引用
屏蔽一个用户