<template>
  <div class="mod-home">
    <h3>旭捷</h3>
    <ul>
      <li><h3>欢迎:{{userName}}!!!</h3></li>
    </ul>
  </div>
</template>

<script>
  export default {
    methods: {
      languageRefresh(){
        let bool = localStorage.getItem('refresh')
        if (bool == '0'){
          this.$router.go(0);
          localStorage.setItem('refresh','1')
        }
      }
    },
    computed: {
      userName: {
        get() {
          return this.$store.state.user.name
        }
      },
      mainTabs: {
        get() {
          return this.$store.state.common.mainTabs
        },
        set(val) {
          this.$store.commit('common/updateMainTabs', val)
        }
      }
    },
    beforeMount() {
      this.languageRefresh()
    }
  }
</script>

<style>
  .mod-home {
    line-height: 1.5;
  }
</style>

