main.js 802 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. Vue.prototype.$api = baseApi
  12. Vue.prototype.$request = request
  13. Vue.prototype.$utils = utils
  14. Vue.prototype.$socket = webim;
  15. Vue.prototype.$store = store
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. Vue.use(uView)
  19. // #ifdef MP
  20. // 引入uView对小程序分享的mixin封装
  21. const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
  22. Vue.mixin(mpShare)
  23. // #endif
  24. const app = new Vue({
  25. store,
  26. ...App
  27. })
  28. // // 引入请求封装
  29. // require('./util/request/index')(app)
  30. app.$mount()