main.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.use(VueI18n,{
  26. // i18n: function(path, options) {
  27. // let value = i18n.t(path, options)
  28. // if (value !== null && value !== undefined) {
  29. // return value
  30. // }
  31. // return ''
  32. // }
  33. // })
  34. Vue.config.productionTip = !!env.isProduction;
  35. const i18n = new VueI18n({
  36. // locale: 'en-US', // 默认选择的语言
  37. locale: 'zh-CN',
  38. messages: {
  39. 'zh-CN': zh, // 中文语言包
  40. 'en-US': en // 英文语言包
  41. }
  42. });
  43. App.mpType = 'app'
  44. // Vue.prototype.serverurl="http://127.0.0.1:8090";67.5
  45. Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
  46. Vue.prototype.$store = store;
  47. Vue.prototype._i18n = i18n;
  48. const app = new Vue({
  49. i18n,
  50. store,
  51. ...App,
  52. });
  53. app.$mount();
  54. Object.keys(apis).forEach(key => {
  55. Vue.prototype[`$${key}`] = apis[key];
  56. });
  57. Vue.component('mainStatistics', mainStatistics);