main.js 727 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. 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. // import '@/common/computed.js';
  19. Vue.prototype.$config = config;
  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