33 lines
753 B
Vue
33 lines
753 B
Vue
<template>
|
|
<a-card :bordered="false" style="display: flex;justify-content:center;height: 100%">
|
|
<div style="margin:100px auto;">
|
|
<img src="~@/assets/welcome.png" class="logo" alt="logo" />
|
|
</div>
|
|
</a-card>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapState } from 'vuex'
|
|
// import Myhome from '@/views/myhome/index.vue'
|
|
export default {
|
|
data () {
|
|
return {}
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
const code = vm.$store.state.user && vm.$store.state.user.currentRole.code
|
|
if (code === 'student') {
|
|
vm.$router.replace({ path: '/myhome' })
|
|
}
|
|
})
|
|
},
|
|
computed: {
|
|
...mapState({
|
|
currentRole: state => state.user.currentRole
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped></style>
|