<template>
	<div>
		<common @asynCallBack="asynCallBack"></common>
	</div>
</template>

<script>
	import * as Dictionaries from '$project/utils/dictionaries'
	import Common from '$project/components/Common.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		name: 'Home',
		components: {
			Common,
		},
		data() {
			return {}
		},
		created() {},
		methods: {
			asynCallBack() {
				//登录状态判断
				if (this.person_popedom) {
					let project = Dictionaries.getProject(this.person_popedom.sceneId);
					window.location.href = '../' + project + '/#/master';
				} else {
					this.$router.push({
						name: 'UserLogin',
						query: {
							project: Dictionaries.getProject(0)
						}
					})
				}
			},
		},
		mounted() {},
		destroyed() {

		},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
				token: 'token',
				person_data: 'person_data',
				person_popedom: 'person_popedom',
			})
		}
	}
</script>

<style src="$project/assets/css/iconfont.css"></style>
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style scoped>
</style>
