main.js 914 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import Vue from 'vue'
  2. import App from './App'
  3. //import MyCommon from '@/components/Common.vue'
  4. //import CarLoading from '@/components/Loading.vue'
  5. import getOpenId from './utils/init.js'
  6. getOpenId.init()
  7. import mixin from './utils/mixin.js'
  8. Vue.config.ignoredElements.push("wx-open-subscribe") ;
  9. Vue.prototype.carhelp=mixin
  10. import Vconsole from 'vconsole'
  11. //import './router' // 引入路由
  12. import router from './bobo-router'
  13. // main.js
  14. import uView from "uview-ui";
  15. Vue.use(uView);
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. const app = new Vue({
  19. ...App
  20. })
  21. //Vue.component('my-common',MyCommon)
  22. //Vue.component('car-loading',CarLoading)
  23. //Vue.use(mixin)
  24. Vue.mixin({
  25. onLoad( option){
  26. if (option.test == 'test') {
  27. let vConsole = new Vconsole()
  28. }
  29. } ,methods:{
  30. gotoUrl(url){
  31. uni.navigateTo({
  32. url:"/"+url
  33. })
  34. }
  35. }
  36. })
  37. app.$mount()