<template>
  <div>
    <PcIndex v-if="isPc"></PcIndex>
    <h5Index v-else></h5Index>
  </div>
</template>

<script>
export default {
  name: "IndexPage",
  beforeRouteEnter(to, from, next) {
    next((vm) => {
      if (/Mobi|Android|iPhone/i.test(navigator.userAgent)) {
        vm.isPc = false;
      }
    });
  },
  data() {
    return {
      isPc: true,
    };
  },
};
</script>