main.js 1.1 KB

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