import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import './registerServiceWorker'
//import "./plugins/element.js"
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "./permission"
import "./utils/eventbus"
import i18n from './plugins/i18n'

Vue.config.productionTip = false
if(localStorage.getItem('ego')){
  store.commit('loginModules/updateToken', JSON.parse(localStorage.getItem("ego")).token  );
  store.commit('loginModules/updateUsername', JSON.parse(localStorage.getItem("ego")).username );
}
Vue.use(ElementUI);
new Vue({
  i18n,
  router,
  store,
  render: h => h(App)
}).$mount('#app')
