import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import { getDicts } from "@/api/system/dict/data"
import { connectWebSocket, eventBus } from '@/utils/websocket'

Vue.use(plugins)

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.getDicts = getDicts
Vue.prototype.$wsEventBus = eventBus;
App.mpType = 'app'

const app = new Vue({
	onLaunch: () => {
		connectWebSocket(); // 应用启动时连接 WebSocket
	},
  ...App
})

app.$mount()
