main.js 830 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 {http2https} from './utils/util.js'
  9. import {
  10. navTo,
  11. showToast,
  12. showSuccess,
  13. showError,
  14. getShareUrlParams
  15. } from './core/app'
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. // 载入uView库
  19. Vue.use(uView)
  20. // 全局mixin
  21. Vue.mixin(mixin)
  22. // 挂载全局函数
  23. Vue.prototype.$toast = showToast
  24. Vue.prototype.$success = showSuccess
  25. Vue.prototype.$error = showError
  26. Vue.prototype.$navTo = navTo
  27. Vue.prototype.$getShareUrlParams = getShareUrlParams
  28. Vue.prototype.$http2https = http2https
  29. // 实例化应用
  30. const app = new Vue({
  31. ...App,
  32. store,
  33. created: bootstrap
  34. })
  35. app.$mount()