main.js 879 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 { requestBase, requestFile } from '@/common/api.js';
  9. Vue.prototype.$api = requestBase;
  10. Vue.prototype.$apifile = requestFile;
  11. // 配置文件
  12. import config from '@/config.js';
  13. Vue.prototype.$config = config;
  14. // 全局分享
  15. import share from "@/common/share.js"
  16. Vue.mixin(share);
  17. // 主体组件
  18. import mobileFrame from '@/components/mobile-frame/index.vue';
  19. Vue.component('mobile-frame', mobileFrame);
  20. Vue.config.productionTip = false;
  21. App.mpType = 'app';
  22. const app = new Vue({
  23. ...App,
  24. });
  25. app.$mount();
  26. // #endif
  27. // #ifdef VUE3
  28. import { createSSRApp } from 'vue';
  29. export function createApp() {
  30. const app = createSSRApp(App);
  31. return {
  32. app,
  33. };
  34. }
  35. // #endif
  36. import '@/common/computed.js';