main.js 1.1 KB

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