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