<template>
	<div id="app">
		<router-view />
	</div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
	created() {
		if (this.token) {
			this.$store.dispatch('permMenu');
			this.$store.dispatch('userInfo');
		}
		let source = this.$project == 'sass' ? 'sass' : 'admin';
		localStorage.setItem('source', source);
		localStorage.setItem('account', 12358);
	},

	computed: {
		...mapGetters(['token'])
	}
};
</script>

<style lang="stylus" src="./assets/css/index.styl"></style>
