fix: 管理后台巡检修复——访问日志用户/设备列字段对齐接口(userName/os/browser),订单星尘列无metadata时按金额兜底显示

This commit is contained in:
Hermes Agent
2026-09-14 22:15:08 +08:00
parent c5da01063c
commit 5e098a3584
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -7,7 +7,7 @@
<el-table :data="list" stripe v-loading="loading" size="small">
<template v-if="tab === 'login'">
<el-table-column label="时间" width="160"><template #default="{ row }">{{ fmt(row.createdAt) }}</template></el-table-column>
<el-table-column label="用户" width="140"><template #default="{ row }">{{ (row.openid || '-').slice(0, 12) }}</template></el-table-column>
<el-table-column label="用户" width="140"><template #default="{ row }">{{ row.userName || '未知用户' }}</template></el-table-column>
<el-table-column prop="type" label="类型" width="80" />
<el-table-column prop="method" label="方式" width="120" />
<el-table-column prop="ip" label="IP" width="120" />
@@ -16,7 +16,9 @@
<el-tag :type="row.success ? 'success' : 'danger'" size="small">{{ row.success ? '成功' : (row.failReason || '失败') }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="userAgent" label="UA" min-width="180" show-overflow-tooltip />
<el-table-column label="设备" min-width="160" show-overflow-tooltip>
<template #default="{ row }">{{ [row.os, row.browser].filter(Boolean).join(' / ') || row.device || '—' }}</template>
</el-table-column>
</template>
<template v-else>
<el-table-column label="时间" width="160"><template #default="{ row }">{{ fmt(row.timestamp || row.createdAt) }}</template></el-table-column>
+1 -1
View File
@@ -33,7 +33,7 @@
<template #default="{ row }">¥{{ row.amount }}</template>
</el-table-column>
<el-table-column label="星尘" width="60">
<template #default="{ row }">{{ row.metadata?.coins || '—' }}</template>
<template #default="{ row }">{{ row.metadata?.coins ?? (row.amount ? Math.round(row.amount * 100) : '—') }}</template>
</el-table-column>
<el-table-column label="状态" width="70">
<template #default="{ row }">