main.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import Vue from 'vue'
  2. import App from './App'
  3. import './event-bus' // load events
  4. import './global/index'
  5. import notification from './notification'
  6. import '@/styles/common.scss' // global css
  7. import i18n from '@/lang' // Internationalization
  8. import './permission' // permission control
  9. import './registerServiceWorker';
  10. import Print from 'vue-print-nb'
  11. Vue.use(Print);
  12. import crudCommon from '@/mixins/crud'
  13. window.$crudCommon = crudCommon;
  14. import vendors from '@/vendors'
  15. const { router, store } = vendors
  16. Vue.config.productionTip = false
  17. // import AMap from 'vue-amap';
  18. // Vue.use(AMap);
  19. import imgPreview from '@/components/imgPreview'
  20. Vue.use(imgPreview)
  21. import echarts from "echarts";
  22. Vue.prototype.$echarts = echarts;
  23. import $ from 'jquery'
  24. // import Warehouse from './common.js'
  25. import Warehouse from './common.js'
  26. Vue.prototype.WAREHOUSE = Warehouse.houseName
  27. Vue.prototype.common = Warehouse
  28. import axios from "axios";
  29. Vue.prototype.$axios = axios;
  30. import global from './global.js'
  31. Vue.prototype.global = global
  32. // 初始化vue-amap
  33. // AMap.initAMapApiLoader({
  34. // // 高德key
  35. // key: 'd5486742b76ab0969e4c3ce26f46dfc6',
  36. // // 插件集合 (插件按需引入)
  37. // plugin: ['AMap.Geolocation', 'Geolocation', 'AMap.DistrictSearch', "AMap.PlaceSearch",'AMap.Autocomplete', 'AMap.Geocoder', 'AMap.DistrictSearch'],
  38. // v: '1.4.4'
  39. // });
  40. // ------------ 通过域名判断起始的登陆页面 开始 --------------------
  41. //使用login的Url
  42. // const urls = [
  43. // 'www.winsea.com',
  44. // 'product-test.winsea.com',
  45. // 'test.winsea.com',
  46. // 'saas.winsea.com',
  47. // 'saas-test.winsea.com'
  48. // ]
  49. // urls.includes(window.location.host)
  50. // ? localStorage.setItem('ws_login_type', 2)
  51. // : localStorage.removeItem('ws_login_type')
  52. // ------------ 通过域名判断起始的登陆页面 结束 --------------------
  53. var vue = new Vue({
  54. el: '#app',
  55. router,
  56. store,
  57. i18n,
  58. render: h => h(App)
  59. })
  60. // 初始化通知监听
  61. notification.init(vue, localStorage.getItem('ws-pf_userId'))
  62. notification.start()