main.js 975 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // #ifndef VUE3
  2. import Vue from 'vue';
  3. import App from './App';
  4. // jwt解析
  5. import weappJwt from '@/common/weapp-jwt.js';
  6. Vue.prototype.$jwt = weappJwt;
  7. // requset请求
  8. import {
  9. requestBase,
  10. requestFile
  11. } from '@/common/api.js';
  12. Vue.prototype.$api = requestBase;
  13. Vue.prototype.$apifile = requestFile;
  14. // 配置文件
  15. import config from '@/config.js';
  16. Vue.prototype.$config = config;
  17. // 全局分享
  18. import share from "@/common/share.js"
  19. Vue.mixin(share);
  20. // 实时通信
  21. import store from '@/store/websocketStore.js'
  22. Vue.prototype.$store = store;
  23. // 主体组件
  24. import mobileFrame from '@/components/mobile-frame/index.vue';
  25. Vue.component('mobile-frame', mobileFrame);
  26. Vue.config.productionTip = false;
  27. App.mpType = 'app';
  28. const app = new Vue({
  29. ...App,
  30. store
  31. });
  32. app.$mount();
  33. // #endif
  34. // #ifdef VUE3
  35. import {
  36. createSSRApp
  37. } from 'vue';
  38. export function createApp() {
  39. const app = createSSRApp(App);
  40. return {
  41. app,
  42. };
  43. }
  44. // #endif
  45. import '@/common/computed.js';