<template>
  <div id="app">
    <feedbackModal v-show="modalState == 'feedback'" />
    <router-view/>
    <audio id="bg-music" src="@/assets/audio/musicBg.mp3" loop></audio>
  </div>
</template>

<script>
import dataAll from '/public/staticData/data';
import feedbackModal from './views/Home/feedbackModal.vue'
import { mapState } from "vuex";
export default {
  name: 'App',
  data() {
    return {
    };
  },
  computed: {
        ...mapState( [ "modalState" ] )
    },
  methods: {
    // 保存静态数据在vuex中
    initStaticData() {
      this.$store.state.dataAll = dataAll
    }
  },
  mounted() {
    this.initStaticData()

  },
  components: {
    feedbackModal,
  }
}
</script>

<style>
@font-face {
  font-family: 'SourceHanSansCN-Bold';
  src: url(@/assets/fonts/SourceHanSansCN-Bold.otf);
}
#app {
  width: 100vw;
  height: 100vh;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
</style>
