main.js 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. window.wx = {}
  14. // main.js
  15. import uView from "uview-ui";
  16. Vue.use(uView);
  17. Vue.config.productionTip = false
  18. App.mpType = 'app'
  19. const app = new Vue({
  20. ...App
  21. })
  22. //Vue.component('my-common',MyCommon)
  23. //Vue.component('car-loading',CarLoading)
  24. //Vue.use(mixin)
  25. Vue.mixin({
  26. onLoad( option){
  27. if (option.test == 'test') {
  28. let vConsole = new Vconsole()
  29. }
  30. } ,methods:{
  31. gotoUrl(url){
  32. uni.navigateTo({
  33. url:"/"+url
  34. })
  35. }
  36. }
  37. })
  38. app.$mount()