index.js 874 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // 挂载变量
  2. import {
  3. BASE_URL,
  4. UPLOAD_URL,
  5. UPLOAD_BASE,
  6. SOCKET_URL,
  7. IMG_URL,
  8. imgurl,
  9. H5_URL,
  10. WORD_URL,LAWYER_URL,LAWYER_URL_FG,
  11. } from '../env.js';
  12. import store from '@/common/store';
  13. import tools from '@/common/utils/tools'
  14. import scan from '@/common/utils/scan'
  15. // mixin混入
  16. import mixin from '@/common/mixins';
  17. const install = Vue => {
  18. Vue.prototype.$BASE_URL = BASE_URL;
  19. Vue.prototype.$SOCKET_URL = SOCKET_URL;
  20. Vue.prototype.$UPLOAD_URL = UPLOAD_URL;
  21. Vue.prototype.$UPLOAD_BASE = UPLOAD_BASE;
  22. Vue.prototype.$IMG_URL = IMG_URL;
  23. Vue.prototype.$imgurl = imgurl;
  24. Vue.prototype.$H5_URL = H5_URL;
  25. Vue.prototype.$WORD_URL = WORD_URL;
  26. Vue.prototype.$LAWYER_URL = LAWYER_URL;
  27. Vue.prototype.$LAWYER_URL_FG = LAWYER_URL_FG;
  28. // 挂载工具函数
  29. Vue.prototype.$tools = tools;
  30. Vue.prototype.$scan = scan;
  31. Vue.mixin(mixin);
  32. }
  33. export default {
  34. install
  35. }