main.js 977 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. Vue.use(VueI18n)
  11. Vue.config.productionTip = !!env.isProduction;
  12. const i18n = new VueI18n({
  13. // locale: 'en-US', // 默认选择的语言
  14. locale: 'zh-CN',
  15. messages: {
  16. 'zh-CN': zh, // 中文语言包
  17. 'en-US': en // 英文语言包
  18. }
  19. });
  20. App.mpType = 'app'
  21. Vue.prototype.serverurl="http://127.0.0.1:8090";
  22. // Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
  23. Vue.prototype.$store = store;
  24. Vue.prototype._i18n = i18n;
  25. const app = new Vue({
  26. i18n,
  27. store,
  28. ...App,
  29. });
  30. app.$mount();
  31. Object.keys(apis).forEach(key => {
  32. Vue.prototype[`$${key}`] = apis[key];
  33. });
  34. // Vue.component('mainStatistics', mainStatistics);