fix: resolve quality audit issues

- utils.js: force UTC+8 output to match MySQL timezone on SCF
- admin subscriptions: return stats (plan counts + revenue) in response
- admin devices: implement keyword search filter
- device-detail: fix binding history field names (bind_time/unbind_time/bind_status)
- user-detail: fix treatment time field (start_time not started_at)
- dashboard: show actual mode per treatment, use sub_stats from dashboard API
这个提交包含在:
Guoguo
2026-04-29 05:37:36 -07:00
父节点 8d1cde8636
当前提交 9f0e629c82
修改 5 个文件,包含 28 行新增15 行删除
+3 -1
查看文件
@@ -3,7 +3,9 @@ function toMysqlDate(value) {
const d = new Date(value)
if (Number.isNaN(d.getTime())) return null
const pad = n => String(n).padStart(2, '0')
return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) + ' ' + pad(d.getHours()) + ':' + pad(d.getMinutes()) + ':' + pad(d.getSeconds())
const offset = 8 * 60
const local = new Date(d.getTime() + offset * 60 * 1000)
return local.getUTCFullYear() + '-' + pad(local.getUTCMonth() + 1) + '-' + pad(local.getUTCDate()) + ' ' + pad(local.getUTCHours()) + ':' + pad(local.getUTCMinutes()) + ':' + pad(local.getUTCSeconds())
}
function formatDate(date) {