<template>
    <div :class="['jumppage', {mobile: type == 'mobile'}]">
        <div class="loading" v-if="type == 'mobile'">
            <i class="el-icon-loading"></i>
            <div class="loading-text">加载中......</div>
        </div>
    </div>
</template>

<script>
import {Loading} from 'element-ui'
export default {
    name: 'LoadingPage',
    data() {
        return {
            loading: null,
            type: '',
        }
    },
    mounted() {
        this.openFullScreen()
    },
    methods: {
        openFullScreen() {
            this.loading = Loading.service({
                lock: true,
                text: '加载中......',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.6)',
            })
        },
    },
    beforeDestroy() {
        this.loading.close()
    },
}
</script>

<style lang="scss" scoped>
.jumppage{
    width:100%;
    height: 100%;
    background: #0c1f3f;
}
.jumppage.mobile{
    background: #fff!important;
    display: flex;
    justify-content: center;
    align-items: center;
}
.loading{
    text-align: center;
}
.el-icon-loading, .loading-text{
    color: #2761ff;
    font-size: 14PX;
}
</style>