main.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import 'babel-polyfill'
  4. import Vue from 'vue'
  5. import axios from 'axios'
  6. import '@/assets/icon/iconfont.css'
  7. import LuckDraw from 'vue-luck-draw'
  8. import { $tips } from '@/components/message'
  9. Vue.use(LuckDraw)
  10. // axios.defaults.baseURL = 'http://192.168.0.249:8080/'
  11. // axios.defaults.baseURL = '/'
  12. const isLocal = process.env.NODE_ENV === 'development' ? false : ~(process.env.ISLOCAL.indexOf('local'))
  13. Vue.prototype.$isLocal = isLocal
  14. const router = require('./router').default
  15. const App = require('./App').default
  16. Vue.config.productionTip = false
  17. Vue.prototype.$http = axios
  18. Vue.prototype.$bus = new Vue()
  19. Vue.mixin({
  20. data () {
  21. return {
  22. g_showVDRegion: {
  23. '淇澳社区': '_001.mp4',
  24. '会同社区': '_002.mp4',
  25. '唐家社区': '_003.mp4'
  26. }
  27. }
  28. },
  29. methods: {
  30. $tips
  31. }
  32. })
  33. // import router from './router'
  34. /* eslint-disable no-new */
  35. new Vue({
  36. el: '#app',
  37. router,
  38. components: { App },
  39. template: '<App/>'
  40. })
  41. document.documentElement.className += ' ie' + document.documentMode