平安校园
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

46 rader
853 B

  1. import App from './App'
  2. import Vue from 'vue'
  3. import store from '@/store';
  4. import mixins from '@/common/mixins.vue'
  5. Vue.mixin(mixins)
  6. // 引入vuex
  7. Vue.prototype.$u = {}
  8. const vuexStore = require("@/store/$u.mixin.js");
  9. Vue.mixin(vuexStore);
  10. // 引入uview-ui
  11. import uView from "uview-ui";
  12. Vue.use(uView);
  13. // #ifndef VUE3
  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 { createSSRApp } from 'vue'
  24. export function createApp() {
  25. const app = createSSRApp(App)
  26. return {
  27. app
  28. }
  29. }
  30. // #endif
  31. // 接口集中管理
  32. import httpInstall from '@/http/install.js'
  33. Vue.use(httpInstall, app)
  34. import http from '@/http/api.js'
  35. Vue.prototype.$http = http
  36. // 公共函数
  37. import globalFunc from '@/utils/func.js'
  38. Vue.use(globalFunc, app);