<template>
    <div>
        <el-dialog
            :visible.sync="dialogVisibleAuthSubmitFailed"
            width="400px"
            :before-close="closeDialog"
            :show-close="false"
            class="dialog-box"
        >
            <img src="~assets/images/icon-status-auth-failed.png" alt />
            <h3>很抱歉，您的实名认证未能通过！</h3>
            <p>请重新进行实名认证！</p>
            <div class="layout-btn" @click="toKyc">重新认证</div>
        </el-dialog>
    </div>
</template>

<script>
import { mapState, mapMutations } from "vuex";
export default {
    name: "noAuth",
    data() {
        return {};
    },
    computed: {
        ...mapState(["userInfo"])
    },
    props: {
        dialogVisibleAuthSubmitFailed: Boolean
    },
    methods: {
        closeDialog() {
            this.$emit("close");
        },
        toKyc() {
            let certificationStatus = this.userInfo.loginInfo
                .certificationStatus;
            if (certificationStatus === "FIRST_TRIAL_FAILURE") {
                this.$router.push({
                    path: "/kyc"
                });
            } else {
                this.$router.push({
                    path: "/kycShareholder"
                });
            }
        }
    }
};
</script>

<style lang="less" scoped>
@import "../../assets/styles/common.css";
.dialog-box {
    h3 {
        margin-top: 30px;
        font-size: 24px;
        color: #3d86e9;
    }
    p {
        margin-top: 20px;
        font-size: 14px;
        color: #666;
    }
}
.layout-btn {
    width: 262px;
    margin: 40px auto 18px;
}
.later-btn {
    color: #666;
}
</style>
