main.js 886 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import App from './App'
  2. import { aes_encrypt, aes_decrypt } from '@/store/aes_endecrypt.js';
  3. Vue.prototype.aes_encrypt = aes_encrypt;
  4. Vue.prototype.aes_decrypt = aes_decrypt;
  5. // #ifndef VUE3
  6. import Vue from 'vue'
  7. import './uni.promisify.adaptor'
  8. Vue.config.productionTip = false
  9. App.mpType = 'app'
  10. // 引入全局 uview 框架
  11. import uView from '@/uni_modules/uview-ui'
  12. Vue.use(uView)
  13. let vuexStore = require("@/store/$u.mixin.js");
  14. Vue.mixin(vuexStore);
  15. import store from '@/store';
  16. const app = new Vue({
  17. store,
  18. ...App
  19. })
  20. // 引入请求封装,将app参数传递到配置中
  21. require('config/request.js')(app)
  22. // 自定义API集中管理引入部分
  23. import utils from '@/config/utils.js'
  24. Vue.use(utils, app)
  25. app.$mount()
  26. // #endif
  27. // #ifdef VUE3
  28. import { createSSRApp } from 'vue'
  29. export function createApp() {
  30. const app = createSSRApp(App)
  31. return {
  32. app
  33. }
  34. }
  35. // #endif