You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

57 lines
910 B

<!-- 页面初始界面 -->
<template>
<view v-show="show" class="pageInit bx">
<image src="@/static/loading/logo.png" mode="aspectFit"></image>
</view>
</template>
<script>
export default {
data() {
return {
show: true,
num: 1,
interval: null
}
},
created() {
this.interval = setInterval(() => {
if (this.num <= 0) {
this.show = false;
this.num = 1;
clearInterval(this.interval);
}
this.num--;
}, 1000)
},
destroyed() {
if (this.interval) {
clearInterval(this.interval);
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.pageInit{
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 0;
width: 100%;
height: 100vh;
background: #fff;
margin: 0rpx auto;
z-index: 999;
transform: translateX(-50%);
image {
width: calc(750rpx / 2);
}
}
</style>