<template>
    <div class="OrderSuccess-form">
        <div class="OrderSuccess-bj"></div>
        <div class="OrderSuccess-c row flex-center items-center cusor-pointer"
        @click="goUrl">
            <div class="OrderSuccess-center text-center"
            :class="[props.PayDatas.VipType==2?'active':'']">
                <div class="OrderSuccess-title">
                    <template v-if="props.PayDatas.OrderType==1">
                        恭喜您成功购买
                    </template>
                    <template v-else-if="props.PayDatas.OrderType==2">
                        恭喜您续费成功
                    </template>
                    <template v-else-if="props.PayDatas.OrderType==3">
                        恭喜您升级成功
                    </template>
                </div>
                <div class="OrderSuccess-type row flex-between">
                    <div class="OrderSuccess-lin">
                        <div></div>
                    </div>
                    <div class="OrderSuccess-hy">
                        <span>{{props.PayDatas.VipType==2?'企业会员':'个人会员'}}</span>
                    </div>
                    <div class="OrderSuccess-lin">
                        <div></div>
                    </div>
                </div>
                <div class="OrderSuccess-time">有效期  {{props.PayDatas.ActiveDate.replace(/-/g, '.')}}-{{props.PayDatas.ExpiredDate.replace(/-/g, '.')}}</div>
            </div>
        </div>
        
    </div>
</template>
<script lang="ts" setup>
    import { ref, onMounted } from 'vue'
    import { useRouter } from 'vue-router';
    const props = defineProps({
        PayDatas: {} as any
    })
    const emit = defineEmits<{
        (event: 'close'): void
    }>()
    const router = useRouter();
    const goUrl = () =>{
        emit('close')
        if(props.PayDatas.VipType==2&&props.PayDatas.OrderType==1){
            router.push({
                path: `/space/0/1`
            })
        }else{
            router.push({
                path: `/space`
            })
        }
    }
</script>
<style scoped>
.OrderSuccess-form,.OrderSuccess-bj{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 10;
}
.OrderSuccess-bj{
    background: #000;
    opacity: 0.6;
    z-index: 11;
}
.OrderSuccess-c{
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 12;
}
.OrderSuccess-center{
    width: 477px;
    height: 391px;
    background: url('../../../assets/img/vipgr.png')no-repeat;
    background-size: 100% 100%;
    z-index: 12;
    padding-right: 17px;
}
.OrderSuccess-title{
    font-family: HYYuanLongHei;
    font-weight: bold;
    font-size: 24px;
    color: #000000;
    padding: 162px 0 5px 0 ;
}
.OrderSuccess-type{
    padding: 0 137px ;
}
.OrderSuccess-lin div{
    width: 23px;
    height: 2px;
    background: #B8B8F7;
    border-radius: 1px;
    border: 0px solid #000000;
    position: relative;
    top: 22px;
}
.OrderSuccess-hy{
    font-family: HYYuanLongHei;
    font-weight: bold;
    font-size: 30px;
    color: #115EFC;
}
.OrderSuccess-time{
    font-family: PingFang SC;
    font-weight: 500;
    font-size: 14px;
    color: #8B94CD;
    padding-top: 15px;
}
.OrderSuccess-center.active{
    background: url('../../../assets/img/vipjt.png')no-repeat;
    background-size: 100% 100%;
}
.OrderSuccess-center.active .OrderSuccess-hy{
    color: #641CF7;
}
</style>