|
|
@ -2,7 +2,8 @@ |
|
|
|
<div :class="['main', { channel: isHome, 'site-en': handleClass() }]"> |
|
|
|
<div :class="['main', { channel: isHome, 'site-en': handleClass() }]"> |
|
|
|
<v-head ref="header"></v-head> |
|
|
|
<v-head ref="header"></v-head> |
|
|
|
<div class="layout"> |
|
|
|
<div class="layout"> |
|
|
|
<transition name="move" mode="out-in"> |
|
|
|
<transition name="move" |
|
|
|
|
|
|
|
mode="out-in"> |
|
|
|
<router-view class="view"></router-view> |
|
|
|
<router-view class="view"></router-view> |
|
|
|
</transition> |
|
|
|
</transition> |
|
|
|
<el-backtop target=".layout"></el-backtop> |
|
|
|
<el-backtop target=".layout"></el-backtop> |
|
|
@ -18,7 +19,7 @@ import vHead from '../header' |
|
|
|
import vFooter from '../footer' |
|
|
|
import vFooter from '../footer' |
|
|
|
import { mapMutations } from 'vuex' |
|
|
|
import { mapMutations } from 'vuex' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
enSite: [1, 4, 6] // 英文站点id |
|
|
|
enSite: [1, 4, 6] // 英文站点id |
|
|
|
}; |
|
|
|
}; |
|
|
@ -28,11 +29,11 @@ export default { |
|
|
|
vFooter |
|
|
|
vFooter |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
isHome() { |
|
|
|
isHome () { |
|
|
|
return Util.isIndex() |
|
|
|
return Util.isIndex() |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.$route.query.siteId && this.setSite(this.$route.query.siteId) |
|
|
|
this.$route.query.siteId && this.setSite(this.$route.query.siteId) |
|
|
|
document.body.onclick = e => { |
|
|
|
document.body.onclick = e => { |
|
|
|
e.stopPropagation() |
|
|
|
e.stopPropagation() |
|
|
@ -43,11 +44,11 @@ export default { |
|
|
|
...mapMutations('content', [ |
|
|
|
...mapMutations('content', [ |
|
|
|
'setSite' |
|
|
|
'setSite' |
|
|
|
]), |
|
|
|
]), |
|
|
|
handleClass() { |
|
|
|
handleClass () { |
|
|
|
return this.enSite.includes(+this.$route.query.siteId || this.$store.state.content.site) |
|
|
|
return this.enSite.includes(+this.$route.query.siteId || this.$store.state.content.site) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 长时间未操作,自动退出登录 |
|
|
|
// 长时间未操作,自动退出登录 |
|
|
|
autoLogout() { |
|
|
|
autoLogout () { |
|
|
|
let lastTime = new Date().getTime(); |
|
|
|
let lastTime = new Date().getTime(); |
|
|
|
document.onmousedown = () => { |
|
|
|
document.onmousedown = () => { |
|
|
|
lastTime = new Date().getTime(); |
|
|
|
lastTime = new Date().getTime(); |
|
|
@ -64,6 +65,9 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
.main { |
|
|
|
|
|
|
|
min-width: 1300px; |
|
|
|
|
|
|
|
} |
|
|
|
.main:not(.channel) { |
|
|
|
.main:not(.channel) { |
|
|
|
min-height: calc(100% - 90px); |
|
|
|
min-height: calc(100% - 90px); |
|
|
|
.layout { |
|
|
|
.layout { |
|
|
|