perf:统一用户信息组件的数据来源

This commit is contained in:
Xwen
2024-01-07 21:19:54 +08:00
parent d0b64b6521
commit 1898068f6b
2 changed files with 9 additions and 5 deletions

View File

@@ -48,7 +48,7 @@
<div class="score">积分3005</div>
<div class="status">
<span>状态</span>
<span> {{ getStatusInfo(userInfo.userLimit.label) }}</span>
<span> {{ getStatusInfo(userInfo.userLimit) }}</span>
</div>
</div>
<div class="hobby">
@@ -98,7 +98,7 @@ const statusTypeList = [
},
];
const getStatusInfo = (type) => {
return statusTypeList.filter((item) => item.value === type)[0];
return statusTypeList.filter((item) => item.value === type)[0]?.label;
};
</script>