<template>
  <div class="content-box">页面找不到，请刷新页面</div>
</template>

<script setup>
import { ref, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { Calendar } from "@element-plus/icons-vue";
import { dayjs } from "element-plus";
import lodash, { reduce } from "lodash";
import axios from "axios";
import { useStore } from "vuex";
const store = useStore();
const router = useRouter();

onBeforeMount(() => {
  // router.push({ path: `/wanzai/NotFound` });
  let roleList = JSON.parse(sessionStorage.getItem("roleList"));
  let flag = roleList.some((item) => {
    return item.route == "/wanzai/home";
  });
  let address = roleList[0].route;
  console.log(flag, address);
  if (!flag) {
    store.commit("indexUp", address);
    router.push({
      path: `${address}`,
    });
    location.reload();
  }
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</script>

<style scoped lang="scss">
.content-box {
  width: 97.5%;
  height: 89%;
  margin: 20px auto;
  background-color: #fff;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
}
.el-input {
  width: 192px;
}
</style>
