main.js 765 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 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 {
  29. createSSRApp
  30. } from 'vue'
  31. export function createApp() {
  32. const app = createSSRApp(App)
  33. return {
  34. app
  35. }
  36. }
  37. // #endif