import Vue from 'vue'
import {USER_INFO} from "@/store/mutation-types"

const getters = {

  token: state => state.user.token,
  
  username: state => state.user.username,
  nickname: state => {
    state.user.realname = Vue.ls.get(USER_INFO).realname;
    return state.user.realname
  },
  welcome: state => state.user.welcome,
  // permissionList: state => state.user.permissionList,
  userInfo: state => {
    state.user.info = Vue.ls.get(USER_INFO);
    return state.user.info
  },
  
}

export default getters