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
这个提交包含在:
+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) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户