会员
This commit is contained in:
@@ -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;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user