From d5d8f12c9ef66c6bd487044fa8343a617500656a Mon Sep 17 00:00:00 2001 From: ingkele <598792849@qq.com> Date: Fri, 23 Oct 2026 21:41:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=AF=E5=88=86=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E6=98=BE=E7=A4=BAuser=5Fid=E4=BE=BF?= =?UTF-8?q?=E4=BA=8E=E6=8E=92=E6=9F=A5=E6=9C=AA=E5=8C=B9=E9=85=8D=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E8=81=94=E8=A1=A8=E5=8A=A0username=E5=85=9C?= =?UTF-8?q?=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/points/log/list.vue | 14 ++++++++++---- .../router/service/admin/points/sys/getList.js | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pages/points/log/list.vue b/pages/points/log/list.vue index f78cac2..287f1eb 100644 --- a/pages/points/log/list.vue +++ b/pages/points/log/list.vue @@ -37,10 +37,16 @@ export default { align: "left", width: 200, formatter: (val, row) => { - const user = row.userInfo && row.userInfo[0] ? row.userInfo[0] : {}; - const name = user.nickname || "未设置昵称"; - const mobile = user.mobile || "-"; - return `
${name}
${mobile}
`; + const user = row.userInfo && row.userInfo[0] ? row.userInfo[0] : null; + const mobile = user && user.mobile ? user.mobile : "-"; + if (user) { + const name = user.nickname || user.username || "未设置昵称"; + return `
${name}
${mobile}
`; + } + // 联表未匹配:显示 user_id 原值便于排查(anonymous 为历史脏数据) + const uid = row.user_id || "-"; + const label = uid === "anonymous" ? "未登录(anonymous)" : uid.slice(0, 12) + "…"; + return `
未匹配用户
${label}
`; } }, { diff --git a/uniCloud-tcb/cloudfunctions/router/service/admin/points/sys/getList.js b/uniCloud-tcb/cloudfunctions/router/service/admin/points/sys/getList.js index cdbdbb9..2a2850f 100644 --- a/uniCloud-tcb/cloudfunctions/router/service/admin/points/sys/getList.js +++ b/uniCloud-tcb/cloudfunctions/router/service/admin/points/sys/getList.js @@ -27,6 +27,7 @@ module.exports = { limit: 1, fieldJson: { nickname: true, + username: true, mobile: true } }]