main.js 687 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. Vue.config.productionTip = false
  6. Vue.mixin(App) //全局混入
  7. import request from './api/request.js'
  8. Vue.prototype.$request=request
  9. import store from './store/index.js'
  10. Vue.prototype.$store = store
  11. import uView from "uview-ui";
  12. Vue.use(uView);
  13. // 自定义全局组件
  14. // import msgPop from './components/msgPop.vue'
  15. // Vue.component("msgPop",msgPop)
  16. App.mpType = 'app'
  17. const app = new Vue({
  18. store,
  19. ...App
  20. })
  21. app.$mount()
  22. // #endif
  23. // #ifdef VUE3
  24. import { createSSRApp } from 'vue'
  25. export function createApp() {
  26. const app = createSSRApp(App)
  27. return {
  28. app
  29. }
  30. }
  31. // #endif