This commit is contained in:
menxipeng
2025-08-03 22:15:27 +08:00
parent bf467fbc58
commit 704e2047a3
7 changed files with 145 additions and 2 deletions

View File

@@ -87,7 +87,7 @@
</template>
<script>
import { listUser, updateUserStatus } from "@/api/user/user";
import { listUser, updateUserStatus, getUserTags } from "@/api/user/user";
export default {
name: "User",
@@ -119,6 +119,20 @@ export default {
listUser(this.queryParams).then(response => {
this.userList = response.rows;
this.total = response.total;
// 获取每个用户的播放标签
this.userList.forEach(user => {
getUserTags(user.userId).then(tagResponse => {
if (tagResponse.code === 200 && tagResponse.data) {
this.$set(user, 'playTag', tagResponse.data);
} else {
this.$set(user, 'playTag', '暂无标签');
}
}).catch(() => {
this.$set(user, 'playTag', '获取失败');
});
});
this.loading = false;
});
},