<template>
<div id="app">
<top />
<global />
<router-view />
</div>
</template>
<script>
import top from '@/components/top.vue'
import global from '@/components/global'
export default {
name: 'Home',
components: {
top,
global
},
mounted() {
// console.log('触发跳转')
this.load()
this.created()
window.addEventListener(
'touchstart',
function (event) {
event.preventDefault()
},
false
)
},
methods: {
load() {
if (this.$route.name == 'device' && this.cite.memberLoginVo == '') {
this.cite.tlTime.djs = this.cite.tlTime.mrT
} else {
if (this.cite.tlTime.djs < 1) {
this.quit()
} else {
this.cite.tlTime.djs = this.cite.tlTime.djs - 1
}
}
setTimeout(()=>{
this.load()
// console.log(this.cite.tlTime.mrT,this.cite.tlTime.djs,this.$route.name)
// console.log(this.cite.tlTime,this.cite,this.$route.name)
},1000)
},
// 禁止web端屏幕缩放
created() {
window.addEventListener("mousewheel",function (event) {
if (event.ctrlKey === true || event.metaKey) {event.preventDefault();}},{ passive: false })
}
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
* {
margin: 0;
padding: 0;
}
body {
background: #fafafa;
}
.flex-center {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.flex-start {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.flex-end {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.flex-between {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
</style>