<template>
    <view class="page">
        <header>
            报名记录（已有 <span class="num">{{list.length}}</span>人报名）
        </header>
        <ul>
            <li v-for="(e,index) in list" :key="index">
               <p>
                   <image :src="e.partyAvatar" v-if="e.partyAvatar"></image>
                   <image src="https://cdn.cunwuyun.cn/img/user-img.png" v-else></image>
                   <span>{{e.partyName.replace(/^./g,'*')}}</span>
               </p>
               <p>{{e.signupTime.substring(0,16)}}</p>
            </li>
        </ul>
    </view>
</template>

<script>
    export default {
        name:"signUpList",
        data(){
            return{
                reportId:'',
                list:[]
            }
        },
        onLoad(options){
            uni.setNavigationBarColor({
                frontColor: "#ffffff",
                backgroundColor: "#e60012",
            })
            this.reportId= options.reportId;
            this.getList();

        },
        methods:{
             getList(){
                this.$instance.post(`/app/apppartyreport/signup-info?id=${this.reportId}`,null,{}).then( res => {
                    if(res.code == 0){
                        this.list = res.data;

                    }else{

                    }
                }).catch( err => {

                })
            },
        }
    }
</script>

<style lang="scss" scoped>
 
.page{
    width: 100%;
    height: 100%;
    background-color: #fff;
    header{
        width: 100%;
        height: 112rpx;
        padding: 0 32rpx;
        font-size:32rpx;
        line-height: 112rpx;
        color:#333333;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        .num{
            color:#D73D3D;
        }
    }
    ul{
        width: 100%;
        height: calc(100% - 112rpx) ;
        overflow: auto;
        li{
            width: 100%;
            height: 148rpx;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
            padding: 0 32rpx;
            box-sizing: border-box;
            p:nth-child(2){
                color:#999999;
                font-size:30rpx;
            }
             p:nth-child(1){
                display: flex;
                align-items: center;
               image{
                   width: 80rpx;
                   height: 80rpx;
                   border-radius: 50%;
               }
               span{
                   font-size:30rpx;
                   color:#2D2D2E;
                   margin-left: 8rpx;
               }
            }
        }
    }
}
</style>
