<template>
<div class="login-container">
    <el-container>
        <v-header></v-header>
        <el-main><slot></slot></el-main>
        <v-footer></v-footer>
    </el-container>
</div>
</template>
<script>
export default {
    name: 'Login',
    components: {
        VHeader: () => import('./../components/VHeader'),
        VFooter: () => import('./../components/VFooter')
    },
    created () {
        try {
            // token 没过期则返回首页
            localStorage.token && localStorage.expireTime && localStorage.expireTime > Date.now() && this.$router.replace('/')
        } catch (e) {}
    }
}
</script>
<style lang="less" scoped>
.login-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 1200px;
    min-height: 645px;
    background-color: #fff;
    .el-container{
        flex-direction: column;
        height: 100%;
        .el-main {
            padding: 0;
            overflow: hidden;
        }
    }
}
</style>
