import { store } from '@/store'

const whiteList = ['/login', '/index', '/404'];

export default function permission(path: string) {
  if (whiteList.indexOf(path) !== -1) {
    return true
  } else {
    for (let data of store.state.menu.menuList) {
      for (let i of data.children) {
        if (i.index === path) {
          return true
        }
      }
    }
  }
}