app.js 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* jQuery & Bootstrap Init */
  2. import jQuery from 'jquery'
  3. window.$ = window.jQuery = jQuery;
  4. /* Fix */
  5. import './fix.scss'
  6. let location = window.location;
  7. let pathname = location.pathname;
  8. window.axios = require('axios')
  9. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
  10. window.OT = require("@opentok/client")
  11. import Vue from 'vue'
  12. window.Vue = Vue
  13. Vue.prototype.$eventBus = new Vue()
  14. import Vuetify from 'vuetify'
  15. Vue.use(Vuetify)
  16. import store from './components/vuex/index'
  17. const files = require.context('./', true, /\.vue$/i, 'lazy').keys()
  18. files.forEach(file => {
  19. let component = file.split('/').pop().split('.')[0]
  20. Vue.component(component, () => import(`${file}`))
  21. })
  22. import VueSocketIO from "vue-socket.io"
  23. import SocketIO from "socket.io-client"
  24. Vue.use(
  25. new VueSocketIO({
  26. debug: false,
  27. connection: SocketIO(process.env.MIX_SOCKET_SERVICE_URL)
  28. })
  29. )
  30. let app = new Vue({
  31. el: '#app',
  32. store,
  33. vuetify: new Vuetify()
  34. })