main.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. Vue.component('cu-custom',cuCustom)
  15. Vue.component('au-custom',auCustom)
  16. Vue.component('cm-custom',cmCustom)
  17. Vue.component('custom-seller',customCeller)
  18. Vue.prototype.$getStorage = function(key){
  19. var userParam = uni.getStorageSync(key);
  20. if (userParam != null && userParam != "" && userParam!= undefined) {
  21. return userParam;
  22. }else{
  23. return null;
  24. }
  25. }
  26. Vue.config.productionTip = false
  27. Vue.prototype.$fire = new Vue();
  28. Vue.prototype.$store = store;
  29. Vue.prototype.$util = {msg, json, prePage,modal};
  30. Vue.prototype.$api = Api;
  31. Vue.prototype.$reg = Regs;
  32. App.mpType = 'app'
  33. const app = new Vue({
  34. ...App
  35. })
  36. app.$mount()