main.js 757 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import App from './App'
  4. Vue.config.productionTip = false
  5. // jwt解析
  6. import weappJwt from '@/common/weapp-jwt.js';
  7. Vue.prototype.$jwt = weappJwt;
  8. // requset请求
  9. import {
  10. requestBase,
  11. requestApp,
  12. requestFile
  13. } from '@/common/api.js';
  14. Vue.prototype.$api = requestBase;
  15. Vue.prototype.$app = requestApp;
  16. Vue.prototype.$apifile = requestFile;
  17. // 配置文件
  18. import config from '@/config.js';
  19. Vue.prototype.$config = config;
  20. App.mpType = 'app'
  21. const app = new Vue({
  22. ...App
  23. })
  24. app.$mount()
  25. // #endif
  26. // #ifdef VUE3
  27. import {
  28. createSSRApp
  29. } from 'vue'
  30. import App from './App.vue'
  31. export function createApp() {
  32. const app = createSSRApp(App)
  33. return {
  34. app
  35. }
  36. }
  37. // #endif