main.js 599 B

12345678910111213141516171819202122232425262728293031323334
  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. // 创建对象
  13. const app = new Vue({
  14. store,
  15. ...App
  16. });
  17. // 接口集中管理
  18. import httpInstall from '@/http/install.js'
  19. Vue.use(httpInstall, app)
  20. import http from '@/http/api.js'
  21. Vue.prototype.$http = http
  22. // 公共函数
  23. import globalFunc from '@/utils/func.js'
  24. Vue.use(globalFunc, app);
  25. app.$mount()