main.js 1.4 KB

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