import router from './index'

router.beforeEach((to, from, next) => {
  const path = to.path
	const  list = {
		zh: 'CHINESE_SIMPLIFIED',
		en: 'ENGLISH'
	}
  if (path.startsWith('/zh') || (to.params.lang === 'zh')) {
    localStorage.setItem('loginLanguage', 'CHINESE_SIMPLIFIED')
  } else if (path.startsWith('/en') || (to.params.lang === 'en')) {
		localStorage.setItem('loginLanguage', 'ENGLISH')
  }

  next()
})

router.afterEach(() => {
})
