main.js 761 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import App from './App'
  2. import api from './api/index.js'
  3. Vue.prototype.$api = api
  4. import common from 'static/js/common.js';
  5. Vue.prototype.$dialog = common;
  6. import store from '@/store/index.js'; // 引入vuex
  7. Vue.prototype.$store = store
  8. import halfLogin from './components/login/halfScreen'
  9. Vue.component('half-login',halfLogin)
  10. import kfService from './components/kfService/kfService'
  11. Vue.component('kf-service',kfService)
  12. // #ifndef VUE3
  13. import Vue from 'vue'
  14. import './uni.promisify.adaptor'
  15. Vue.config.productionTip = false
  16. App.mpType = 'app'
  17. const app = new Vue({
  18. ...App
  19. })
  20. app.$mount()
  21. // #endif
  22. // #ifdef VUE3
  23. import {
  24. createSSRApp
  25. } from 'vue'
  26. export function createApp() {
  27. const app = createSSRApp(App)
  28. return {
  29. app
  30. }
  31. }
  32. // #endif