import { mapState } from 'vuex';

export default {
    computed: {
        ...mapState(['userInfo'])
    },
    methods: {
        getAdmin() {
            let data = this.userInfo.authorities;
            for (let item in data) {
                if (data[item].name === 'ROLE_ADMIN') {
                    return true;
                }
            }
            return false;
        },
        getUserAttractions() {
            return this.userInfo.attractionsId;
        }
    }
};
