main.js 690 B

12345678910111213141516171819202122232425262728293031323334
  1. import App from './App'
  2. import uView from '@/uni_modules/uview-ui'
  3. import store from '@/store';
  4. Vue.use(uView)
  5. // #ifndef VUE3
  6. import Vue from 'vue'
  7. // main.js
  8. import './uni.promisify.adaptor'
  9. Vue.config.productionTip = false
  10. App.mpType = 'app'
  11. import {mixin} from './utils/wxShare.js'
  12. Vue.mixin(mixin)
  13. // 引入vuex
  14. const vuexStore = require("@/store/$u.mixin.js");
  15. Vue.mixin(vuexStore);
  16. // 创建对象
  17. const app = new Vue({
  18. store,
  19. ...App
  20. });
  21. import httpInstall from '@/http/install.js'
  22. Vue.use(httpInstall, app)
  23. import http from '@/http/api.js'
  24. Vue.prototype.$http = http
  25. // 公共函数
  26. import globalFunc from '@/utils/func.js'
  27. Vue.use(globalFunc, app);
  28. app.$mount()
  29. // #endif