main.js 871 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import Vue from 'vue'
  2. import App from './App'
  3. // vuex
  4. import store from './store'
  5. // 引入全局uView
  6. import uView from '@/uni_modules/uview-ui'
  7. import baseApi from '@/util/base.js'
  8. import request from '@/util/request.js'
  9. import utils from '@/util/util.js'
  10. import webim from 'webim.js';
  11. import helper from'@/common/helper.js'
  12. Vue.prototype.$api = baseApi
  13. Vue.prototype.$request = request
  14. Vue.prototype.$utils = utils
  15. Vue.prototype.$helper = helper
  16. Vue.prototype.$socket = webim;
  17. Vue.prototype.$store = store
  18. Vue.config.productionTip = false
  19. App.mpType = 'app'
  20. Vue.use(uView)
  21. // #ifdef MP
  22. // 引入uView对小程序分享的mixin封装
  23. const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
  24. Vue.mixin(mpShare)
  25. // #endif
  26. const app = new Vue({
  27. store,
  28. ...App
  29. })
  30. // // 引入请求封装
  31. // require('./util/request/index')(app)
  32. app.$mount()