main.js 807 B

123456789101112131415161718192021222324252627282930313233343536
  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 mobileFrame from '@/components/mobile-frame/index.vue';
  16. Vue.component('mobile-frame', mobileFrame);
  17. Vue.config.productionTip = false;
  18. App.mpType = 'app';
  19. const app = new Vue({
  20. ...App,
  21. });
  22. app.$mount();
  23. // #endif
  24. // #ifdef VUE3
  25. import { createSSRApp } from 'vue';
  26. export function createApp() {
  27. const app = createSSRApp(App);
  28. return {
  29. app,
  30. };
  31. }
  32. // #endif
  33. import '@/common/computed.js';