<template>
    <div class="invitation-wrap">
        <div class="list-group list-group-flush">
            <div class="list-group-item d-flex justify-content-between align-items-center"
                 v-for="item in data.list">
                <div class="user">
                    <img class="avator" width="40" :src="itema.avatar" alt="">
                    <span class="name ml-2">{{item.nickname}}</span>
                </div>
                <div class="status">
                    {{item.status}}
                </div>
            </div>
        </div>
    </div>
</template>

<script lang="ts">
    import {Component, Vue} from "vue-property-decorator";
    import Http from "../../extend/Http";
    import Utils from "../../extend/Utils";
    import wx from "weixin-jsapi";
    import router from "../../router";

    @Component({
        components: {}
    })
    export default class UserIndex extends Vue {

        public data: any = {
            list: [],
        };

        async created() {
            let res = await Http.getInstance().getInvitationList();
            res.data.forEach((item: any) => {
                this.data.list.push({
                    avatar: item.avatar,
                    nickname: item.nickname,
                    status: item.status == 1 ? "已邀请" : item.status == 2 ? "邀请成功,奖励发放中" : "已完成",
                });
            });
        }
    }
</script>


<style scoped>
    .avator {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 3rem;
    }

    .list-group-item a {
        color: #212529;
    }
</style>
