import { btnAuthFilter,setToken, getToken } from '@/libs/util'
import userinfo from  "./metainfo/userinfo"
import tanentinfo from  "./metainfo/tanentinfo"
import dicinfo from "./metainfo/dict"
import roleinfo from './metainfo/roleinfo';
import appinfo from './metainfo/appinfo';
import routeinfo from './metainfo/routeinfo';
export default {
  state: {
      dict_info:dicinfo,
      user_info:userinfo,
      tanent_info:tanentinfo,
      role_info:roleinfo,
      app_info:appinfo,
      route_info:routeinfo,
  },
  mutations: {

  },
  getters: {
    user_info: (state, getters, {user}) => btnAuthFilter(state.user_info,user.userobj),//定义一个函数添加权限控制逻辑
    tanent_info: (state, getters, {user}) => btnAuthFilter(state.tanent_info,user.userobj),//定义一个函数添加权限控制逻辑
    role_info: (state, getters, {user}) => btnAuthFilter(state.role_info,user.userobj),//定义一个函数添加权限控制逻辑
    app_info: (state, getters, {user}) => btnAuthFilter(state.app_info,user.userobj),//定义一个函数添加权限控制逻辑
    route_info: (state, getters, {user}) => btnAuthFilter(state.route_info,user.userobj),//定义一个函数添加权限控制逻辑
    dict_info:state=>state.dict_info
  },
  actions: {
  
  }
}
