main.js 748 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import Vue from 'vue'
  2. import uView from 'uview-ui'
  3. import App from './App'
  4. import store from './store'
  5. import bootstrap from './core/bootstrap'
  6. import mixin from './core/mixins/app'
  7. import './js_sdk/ican-H5Api/ican-H5Api'
  8. import {
  9. navTo,
  10. showToast,
  11. showSuccess,
  12. showError,
  13. getShareUrlParams
  14. } from './core/app'
  15. Vue.config.productionTip = false
  16. App.mpType = 'app'
  17. // 载入uView库
  18. Vue.use(uView)
  19. // 全局mixin
  20. Vue.mixin(mixin)
  21. // 挂载全局函数
  22. Vue.prototype.$toast = showToast
  23. Vue.prototype.$success = showSuccess
  24. Vue.prototype.$error = showError
  25. Vue.prototype.$navTo = navTo
  26. Vue.prototype.$getShareUrlParams = getShareUrlParams
  27. // 实例化应用
  28. const app = new Vue({
  29. ...App,
  30. store,
  31. created: bootstrap
  32. })
  33. app.$mount()