main.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. console.log('v2.0')
  2. import Vue from 'vue'
  3. import App from './App.vue'
  4. import router from './router'
  5. import "@/assets/style/reset.css"
  6. import store from "@/store/index.js"
  7. import Vant from 'vant'
  8. import 'vant/lib/index.css'
  9. Vue.use(Vant)
  10. import SlideTip from "@/components/SlideTip.vue"
  11. Vue.component('SlideTip', SlideTip)
  12. import BackBtn from "@/components/BackBtn.vue"
  13. Vue.component('BackBtn', BackBtn)
  14. Vue.config.productionTip = false
  15. if (process.env.NODE_ENV === 'development') {
  16. Vue.prototype.$publicPath = '/'
  17. } else if (process.env.NODE_ENV === 'production') {
  18. Vue.prototype.$publicPath = '/dist/'
  19. }
  20. Vue.prototype.$backEndBaseUrl = 'https://culture.4dage.com/njmuseum/'
  21. document.documentElement.style.fontSize = window.innerHeight * 0.025276 + 'px'
  22. window.addEventListener('resize', () => {
  23. document.documentElement.style.fontSize = window.innerHeight * 0.025276 + 'px'
  24. })
  25. document.addEventListener('touchstart', function(event) {
  26. if (event.touches.length > 1) {
  27. event.preventDefault()
  28. }
  29. }, { passive: false, capture: false })
  30. new Vue({
  31. router,
  32. store,
  33. render: h => h(App),
  34. }).$mount('#app')