const getters = {
  sidebar: state => state.app.sidebar,
  size: state => state.app.size,
  searchSize: state => state.app.searchSize,
  tablebtnSize: state => state.app.tablebtnSize,
  device: state => state.app.device,
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  introduction: state => state.user.introduction,
  roles: state => state.user.roles,
  errorLogs: state => state.errorLog.logs,
  btnList: state => state.user.btnList,
  navList: state => state.user.navList,
  mainList: state => state.user.mainList,
  business_company: state => state.user.business_company,
  business_companyNo: state => state.currentCompany,
  isSupertube: state => state.user.isSupertube,
  userInfo: state => state.user.userInfo,
  roleProcess: state => state.user.roleProcess,
  // 当前用户等级
  currentLevel: state => state.user.currentLevel,
  // 原始用户等级
  originLevel: state => state.user.originLevel,
  currentCompany: state => state.user.currentCompany,
  companyList: state => state.user.companyList,
  private_field: state => {
    if (!state.user.private_field) return []
    if (typeof state.user.private_field === 'string') return JSON.parse(state.user.private_field)
    return state.user.private_field
  }
}
export default getters
