main.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import Vue from 'vue'
  2. import store from './store'
  3. import App from './App'
  4. import './services/index.js'
  5. import * as Api from '@/common/config/caimeiApi.js'
  6. import * as Regs from '@/common/config/common.js'
  7. import { msg, modal,json,prePage } from'./utils/util'
  8. // import '@/common/utils/module.js'
  9. import Json from './json' //本地数据
  10. import cuCustom from './components/cm-custom/cu-custom.vue'
  11. import auCustom from './components/cm-custom/au-custom.vue'
  12. import cmCustom from './components/cm-custom/cm-custom.vue'
  13. import customCeller from './components/cm-custom/custom-seller.vue'
  14. import scrollTop from '@/components/cm-module/scrollTop/scrollTop.vue'
  15. Vue.component('cu-custom',cuCustom)
  16. Vue.component('au-custom',auCustom)
  17. Vue.component('cm-custom',cmCustom)
  18. Vue.component('custom-seller',customCeller)
  19. Vue.component('scroll-top',scrollTop)
  20. Vue.prototype.$getStorage = function(key){
  21. var userParam = uni.getStorageSync(key);
  22. if (userParam != null && userParam != "" && userParam!= undefined) {
  23. return userParam;
  24. }else{
  25. return null;
  26. }
  27. }
  28. Vue.config.productionTip = false
  29. Vue.prototype.$fire = new Vue();
  30. Vue.prototype.$store = store;
  31. Vue.prototype.$util = {msg, json, prePage,modal};
  32. Vue.prototype.$api = Api;
  33. Vue.prototype.$reg = Regs;
  34. App.mpType = 'app'
  35. const app = new Vue({
  36. ...App
  37. })
  38. app.$mount()