fix: 积分明细用户列兼容联表返回对象形态(vk limit:1 返回对象非数组)

This commit is contained in:
2026-10-23 21:45:19 +08:00
parent d5d8f12c9e
commit a6e80328f1
+3 -1
View File
@@ -37,7 +37,9 @@ export default {
align: "left",
width: 200,
formatter: (val, row) => {
const user = row.userInfo && row.userInfo[0] ? row.userInfo[0] : null;
// vk 联表 limit:1 返回对象而非数组,两种形态兼容
const raw = row.userInfo;
const user = Array.isArray(raw) ? (raw[0] || null) : (raw || null);
const mobile = user && user.mobile ? user.mobile : "-";
if (user) {
const name = user.nickname || user.username || "未设置昵称";