main.js 977 B

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