main.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 ko from '@/common/lang/ko';
  10. import mainStatistics from '@/pages/Charts/mainStatistics';
  11. //谷歌地图
  12. // import * as VueGoogleMaps from 'vue2-google-maps'
  13. // Vue.use(VueGoogleMaps, {
  14. // load: {
  15. // key: 'AIzaSyAqxnF8_35P_vlxVGxKhfL2lxFup-qZF6g',
  16. // libraries: 'places',
  17. // // This is required if you use the Autocomplete plugin
  18. // // OR: libraries: 'places,drawing'
  19. // // OR: libraries: 'places,drawing,visualization'
  20. // // (as you require)
  21. // //// If you want to set the version, you can do so:
  22. // // v: '3.26',
  23. // },
  24. // })
  25. Vue.use(VueI18n)
  26. // Vue.use(VueI18n,{
  27. // i18n: function(path, options) {
  28. // let value = i18n.t(path, options)
  29. // if (value !== null && value !== undefined) {
  30. // return value
  31. // }
  32. // return ''
  33. // }
  34. // })
  35. Vue.config.productionTip = !!env.isProduction;
  36. const i18n = new VueI18n({
  37. // locale: 'en-US', // 默认选择的语言
  38. locale: 'zh-CN',
  39. messages: {
  40. 'zh-CN': zh, // 中文语言包
  41. 'en-US': en, // 英文语言包
  42. 'ko': ko, //韩语语言包
  43. }
  44. });
  45. App.mpType = 'app'
  46. // Vue.prototype.serverurl="http://127.0.0.1:8090";
  47. Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
  48. Vue.prototype.$store = store;
  49. Vue.prototype._i18n = i18n;
  50. const app = new Vue({
  51. i18n,
  52. store,
  53. ...App,
  54. });
  55. app.$mount();
  56. Object.keys(apis).forEach(key => {
  57. Vue.prototype[`$${key}`] = apis[key];
  58. });
  59. Vue.component('mainStatistics', mainStatistics);