main.js 709 B

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