fix: resolve critical audit issues across all modules
Server: add filter/search/pagination to admin list endpoints, enrich user/device queries with JOINs and subqueries, prevent duplicate active subscriptions on creation. Admin console: fix record page TypeError on numeric record_id, correct mode comparison (integer vs string), fix device detail field names and command opcode, remove hardcoded login credentials, wire up dead buttons (unbind, view logs, export), fix user/subscription field mappings. Miniprogram: fix subscription status string/number mismatches across index/treatment-setup/profile pages, fix device name field reference, fix treatment-done null device_id by capturing at onLoad.
这个提交包含在:
@@ -23,7 +23,7 @@
|
||||
<text class="stat-label">护理次数</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-value">{{ user.total_duration || '0h' }}</text>
|
||||
<text class="stat-value">{{ user.total_duration ? Math.round(user.total_duration / 3600000) + 'h' : '0h' }}</text>
|
||||
<text class="stat-label">累计时长</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
@@ -112,8 +112,7 @@ export default {
|
||||
uni.navigateTo({ url: '/pages/record/index?user_id=' + this.userId })
|
||||
},
|
||||
subStatusText(status) {
|
||||
const map = { yearly: '年卡会员', monthly: '月卡会员', trial: '试用中', none: '未订阅' }
|
||||
return map[status] || '未订阅'
|
||||
return status === 1 ? '已订阅' : '未订阅'
|
||||
},
|
||||
subTypeText(type) {
|
||||
const map = { yearly: '年卡', monthly: '月卡', trial: '试用' }
|
||||
|
||||
在新工单中引用
屏蔽一个用户