main.js 693 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 {
  9. getToken,
  10. requestBase,
  11. requestFile
  12. } from '@/common/api.js';
  13. Vue.prototype.$token = getToken;
  14. Vue.prototype.$api = requestBase;
  15. Vue.prototype.$apifile = requestFile;
  16. // 配置文件
  17. import config from '@/config.js';
  18. Vue.prototype.$config = config;
  19. Vue.config.productionTip = false;
  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. export function createApp() {
  31. const app = createSSRApp(App);
  32. return {
  33. app,
  34. };
  35. }
  36. // #endif