main.js 795 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from '@/store';
  4. Vue.config.productionTip = false;
  5. App.mpType = 'app';
  6. // 引入全局uView
  7. import uView from 'uview-ui'
  8. Vue.use(uView)
  9. // 引入vuex
  10. const vuexStore = require("@/store/$u.mixin.js");
  11. Vue.mixin(vuexStore);
  12. import '@/common/bluetooth.js';
  13. //全局数据状态管理 vuex
  14. // import store from '@/store/index.js';
  15. // Vue.prototype.$store = store;
  16. //全局公用静态数据
  17. import Mock from '@/common/mock/index.js';
  18. Vue.prototype.$Mock = Mock;
  19. App.mpType = 'app'
  20. // 创建对象
  21. const app = new Vue({
  22. store,
  23. ...App
  24. });
  25. // 接口集中管理
  26. import httpInstall from '@/http/install.js'
  27. Vue.use(httpInstall, app)
  28. // 公共函数
  29. import globalFunc from '@/utils/func.js'
  30. Vue.use(globalFunc, app);
  31. app.$mount()