feat: complete feature gaps across all modules

Server:
- Add settings-cache with 60s TTL for feature toggle checks
- Enforce maintenance_mode on login, enable_binding on device bind

Admin console:
- Remove dead "发送通知" button from user detail
- Firmware check calls real API and compares versions

Miniprogram:
- Wear-check: dynamic battery/connected from BLE state
- Login: hide non-functional phone auth button
- Treating: show actual selected regions instead of hardcoded "全脸"
- Index: display subscription status with tap to manage
- Auto-scan: show "待检测" instead of "--" for PD data
- Agreements: tap shows "内容建设中" modal
这个提交包含在:
Guoguo
2026-05-02 08:48:26 -07:00
父节点 1017fb5dae
当前提交 031678c03f
修改 17 个文件,包含 116 行新增12 行删除
+18 -1
查看文件
@@ -162,8 +162,25 @@ export default {
onViewLogs() {
this.$emit('navigate', 'log', { device_id: this.deviceId })
},
onCheckUpdate() {
async onCheckUpdate() {
uni.showToast({ title: '正在检查更新...', icon: 'none' })
try {
const data = await get('/api/v1/admin/firmware')
const records = data.records || []
const latest = records.filter(r => r.status === 1).sort((a, b) => b.firmware_id - a.firmware_id)[0]
if (!latest) {
uni.showToast({ title: '暂无固件信息', icon: 'none' })
return
}
const current = this.device && this.device.firmware_version
if (current && current === latest.version) {
uni.showToast({ title: '当前已是最新版本', icon: 'success' })
} else {
uni.showToast({ title: '发现新版本 v' + latest.version, icon: 'none', duration: 3000 })
}
} catch (e) {
uni.showToast({ title: '检查更新失败', icon: 'none' })
}
},
formatDate: formatDateUtil
}
@@ -5,7 +5,6 @@
<view class="page-card" v-if="user">
<view class="page-header">
<text class="page-title">👥 用户详情 - {{ user.nickname || user.user_id }}</text>
<button class="btn-primary btn-sm">发送通知</button>
</view>
<view class="user-profile">