fix: 积分明细用户列显示user_id便于排查未匹配记录,联表加username兜底
This commit is contained in:
@@ -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 `<div>${name}</div><div style="color:#999;font-size:12px;">${mobile}</div>`;
|
||||
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 `<div>${name}</div><div style="color:#999;font-size:12px;">${mobile}</div>`;
|
||||
}
|
||||
// 联表未匹配:显示 user_id 原值便于排查(anonymous 为历史脏数据)
|
||||
const uid = row.user_id || "-";
|
||||
const label = uid === "anonymous" ? "未登录(anonymous)" : uid.slice(0, 12) + "…";
|
||||
return `<div style="color:#f56c6c;">未匹配用户</div><div style="color:#999;font-size:12px;">${label}</div>`;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ module.exports = {
|
||||
limit: 1,
|
||||
fieldJson: {
|
||||
nickname: true,
|
||||
username: true,
|
||||
mobile: true
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user