main.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import Vue from 'vue'
  2. import VueI18n from 'vue-i18n'
  3. import App from './App'
  4. import apis from './configs/http';
  5. import store from './store';
  6. import env from '@/configs/env';
  7. import zh from '@/common/lang/zh';
  8. import en from '@/common/lang/en';
  9. import mainStatistics from '@/pages/Charts/mainStatistics';
  10. //谷歌地图
  11. // import * as VueGoogleMaps from 'vue2-google-maps'
  12. // Vue.use(VueGoogleMaps, {
  13. // load: {
  14. // key: 'AIzaSyAqxnF8_35P_vlxVGxKhfL2lxFup-qZF6g',
  15. // libraries: 'places',
  16. // // This is required if you use the Autocomplete plugin
  17. // // OR: libraries: 'places,drawing'
  18. // // OR: libraries: 'places,drawing,visualization'
  19. // // (as you require)
  20. // //// If you want to set the version, you can do so:
  21. // // v: '3.26',
  22. // },
  23. // })
  24. Vue.use(VueI18n)
  25. Vue.config.productionTip = !!env.isProduction;
  26. const i18n = new VueI18n({
  27. // locale: 'en-US', // 默认选择的语言
  28. locale: 'zh-CN',
  29. messages: {
  30. 'zh-CN': zh, // 中文语言包
  31. 'en-US': en // 英文语言包
  32. }
  33. });
  34. App.mpType = 'app'
  35. // Vue.prototype.serverurl="http://127.0.0.1:8686";
  36. Vue.prototype.serverurl="http://127.0.0.1:8090";
  37. // Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
  38. Vue.prototype.$store = store;
  39. Vue.prototype._i18n = i18n;
  40. const app = new Vue({
  41. i18n,
  42. store,
  43. ...App,
  44. });
  45. app.$mount();
  46. Object.keys(apis).forEach(key => {
  47. Vue.prototype[`$${key}`] = apis[key];
  48. });
  49. Vue.component('mainStatistics', mainStatistics);