main.js 842 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store'
  4. import config from './common/config.js'
  5. import squni from './util/squni.js'
  6. import mixin from './common/mixin'
  7. // #ifdef MP-WEIXIN
  8. import wxShare from './util/wx-share.js'
  9. // #endif
  10. // ColorUI返回组件
  11. import cuCustom from '@/uni_modules/colorui/components/cu-custom.vue'
  12. Vue.config.productionTip = false
  13. Vue.prototype.$store = store
  14. Vue.prototype.$config = config
  15. Vue.prototype.$squni = squni
  16. // 为了保证onLaunch执行完后,再执行页面级别的onShow/onLoad
  17. Vue.prototype.$ready = new Promise(resolve => {
  18. Vue.prototype.$emitReady = resolve
  19. })
  20. Vue.component('cu-custom', cuCustom)
  21. Vue.mixin(mixin)
  22. // #ifdef MP-WEIXIN
  23. Vue.mixin(wxShare)
  24. // #endif
  25. App.mpType = 'app'
  26. const app = new Vue({
  27. store,
  28. ...App
  29. })
  30. squni.setApp(app)
  31. app.$mount()