main.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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:9443/cleanMachineServer";
  23. Vue.prototype.serverurl= 'https://clean.sunzee.com.cn/cleanMachineServer',
  24. Vue.prototype.$store = store;
  25. Vue.prototype._i18n = i18n;
  26. const app = new Vue({
  27. i18n,
  28. store,
  29. ...App,
  30. });
  31. app.$mount();
  32. Object.keys(apis).forEach(key => {
  33. Vue.prototype[`$${key}`] = apis[key];
  34. });
  35. Vue.component('mainStatistics', mainStatistics);