<template>
    <!-- <TopNavigation/> -->
    <div class="content">
        <!-- 实名认证失败 -->
        <div class="under_review" v-if="this.userInfo && this.userInfo.authStatus === 'FAIL'">
            <img :src="require('@assets/shenqing_weitongguo.png')" alt="" class="under_review_img" />
            <div class="under_review_title">资料审核失败</div>
            <div class="audit_failed_tip">很遗憾，您的资料审核失败！请检查您填写的资料是否正确以及上传照片是否清晰</div>
            <div class="under_review_return">
                <div class="under_review_return_con" @click="$router.replace('/verified')">申请认证</div>
            </div>
        </div>
        <!-- 实名认证审核中 -->
        <div class="under_review" v-else>
            <img :src="require('@assets/shenqing_shenhezhong.png')" alt="" class="under_review_img" />
            <div class="under_review_title">提交成功，请等待审核</div>
            <div class="under_review_tip">平台将于5分钟内完成资料审核，请耐心等待</div>
            <div class="under_review_return">
                <div class="under_review_return_con" @click="$router.replace('/home')">回到首页</div>
            </div>
        </div>
    </div>
    <!-- <div class="page">
        <img class="img" :src="statusInfo.img" alt="" />
        <div class="title">{{ statusInfo.title }}</div>
        <div class="sub">
            {{ statusInfo.sub }}
        </div>

        <div class="btn" v-if="statusInfo.showBtn">
            <van-button type="primary" block plain round @click="$router.replace('/Authentication')">
                重新申请
            </van-button>
        </div>
    </div> -->
</template>

<script>
import { mapState } from 'vuex';
// import TopNavigation from "../../components/TopNavigation.vue"
export default {
    computed: {
        ...mapState(['userInfo'])
        // statusInfo() {
        // if (this.userInfo && this.userInfo.authStatus) {
        //     return { ...this.info }[this.userInfo.authStatus];
        // } else {
        //     return this.info.PENDING;
        // }
        // }
    },
    components: {
        // TopNavigation
    },
    data() {
        return {
            // info: {
            //     PENDING: {
            //         img: require('@assets/shenqing_shenhezhong.png'),
            //         title: '资料审核中',
            //         sub: '平台将于3日内完成资料审核，平台内通知审核结果',
            //         showBtn: false
            //     },
            //     FAIL: {
            //         img: require('@assets/shenqing_weitongguo.png'),
            //         title: '资料审核失败',
            //         sub: '很遗憾，您的资料审核失败，请检查您填写的资料是否正确以及上传照片是否清晰',
            //         showBtn: true
            //     }
            // }
        };
    },
    beforeRouteEnter(to, from, next) {
        next(vm => {
            vm.$store.dispatch('getUserInfo');
        });
    }
};
</script>

<style lang="less" scoped>
.content {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #fff;
    // margin-top: 44px;
    .under_review {
        .under_review_img {
            // margin: 50px 0px 30px 133px;
            display: block;
            width: 100%;
            // height: 86px;
            height: auto;
        }
        .under_review_title {
            text-align: center;
            font-size: 16px;
            color: #202020;
            line-height: 22px;
            margin-top: 18px;
        }
        .under_review_tip {
            text-align: center;
            font-size: 13px;
            color: #909090;
            line-height: 20px;
            margin-top: 11px;
        }
        .audit_failed_tip {
            text-align: center;
            padding: 0 37px;
            box-sizing: border-box;
            font-size: 13px;
            color: #909090;
            line-height: 20px;
            margin-top: 11px;
        }
        .under_review_return {
            margin-top: 100px;
            padding: 0 67px;
            box-sizing: border-box;
            .under_review_return_con {
                width: 100%;
                height: 40px;
                background: #2ba1f5;
                border-radius: 8px;
                font-size: 16px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #fff;
                line-height: 40px;
                text-align: center;
            }
        }
    }
}
</style>
