main.js 628 B

12345678910111213141516171819202122232425262728293031323334
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. Vue.config.productionTip = false
  5. App.mpType = 'app'
  6. import signature from 'utils/signature.js'
  7. import store from './store'
  8. Vue.prototype.$store = store // 定义成全局组件
  9. import request from 'utils/request.js'
  10. Vue.prototype.$http = request.http
  11. Vue.prototype.$fetchPost = request.fetchPost
  12. Vue.prototype.$baseURL = request.baseURL
  13. Vue.prototype.$getHashQuery=signature.getHashQuery
  14. const app = new Vue({
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. return {
  23. app
  24. }
  25. }
  26. // #endif