This commit is contained in:
USER-20220102CG\noblelift
2023-03-27 15:39:20 +08:00
parent 87d6c0f8d1
commit 81bfa90bd3
1430 changed files with 141780 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<template>
<div id="app" @mousemove="moveEvent" @click="moveEvent">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {
timmer: null
}
},
methods: {
moveEvent: function() {
const path = ['/login']
if (!path.includes(this.$route.path)) {
clearTimeout(this.timmer)
this.init()
}
},
init: function() {
this.timmer = setTimeout(() => {
sessionStorage.clear()
this.logout()
}, 100000 * 60 * 60) // 15分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
},
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload()
})
}
}
}
</script>