<script setup>
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
</script>

<template>
  <van-config-provider :theme-vars="themeVars">
    <keep-alive>
      <router-view />
    </keep-alive>
    <!-- <div class="appVersion">v1.0.1</div> -->
  </van-config-provider>
</template>
<script>
import { onlineDetection } from "./api/system/registerConfig";

export default {
  data() {
    return {
      themeVars: {},
    };
  },
  computed() {},
  mounted() {
    // 初始化当前子系统配置
    this.$store.dispatch("sysConf/InitSysConf");

    setInterval(() => {
      onlineDetection({
        authCode: this.$store.state.sysConf.authCode,
        SYSTEM: 1,
      }).then((res) => {
        if(res.code=='200'){
          localStorage.setItem('hearBeatStatus','true');
        }else{
          localStorage.setItem('hearBeatStatus','false');
        }
      });
    }, 10000);
  },
};
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background-color: rgb(237, 237, 237);
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0px;
  bottom: 0px;
}
* {
  margin: 0;
  padding: 0;
}

:root {
  /* Dialog */
  --van-dialog-width: 70% !important;
  --van-dialog-font-size: 30px !important;
  --van-dialog-header-line-height: 60px !important;
  --van-dialog-header-padding-top: 35px !important;
  --van-dialog-message-font-size: 28px !important;
  --van-dialog-message-line-height: 60px !important;
  --van-dialog-button-height: 80px !important;
  /* NavBar */
  --van-nav-bar-height: 90px !important;
  --van-nav-bar-background-color: #006953 !important;
  --van-nav-bar-title-font-size: 30px !important;
  --van-nav-bar-title-text-color: #ffffff !important;
  --van-nav-bar-icon-color: #ffffff !important;
  --van-nav-bar-arrow-size: 40px !important;
  --van-nav-bar-text-color: #ffffff !important;
  /* picker */
  --van-picker-background-color: rgb(237, 237, 237);
  --van-picker-action-font-size: 30px !important;
  --van-picker-action-padding: 30px 30px 0 30px !important;
  --van-picker-option-font-size: 28px !important;
  --van-notify-line-height: 75px !important;
  --van-notify-font-size: 25px !important;


  --van-popover-action-width:300px !important;
  --van-popover-action-height:90px !important;
  --van-popover-action-font-size:28px !important;
}
.van-nav-bar__text {
  font-size: 30px !important;
}
.van-nav-bar__title {
  height: 60px;
  line-height: 60px;
}
.van-picker__toolbar {
  height: 70px !important;
}
.van-button {
  font-size: 30px !important;
}
/* input:-webkit-autofill {
  box-shadow: 0 0 0px 1000px rgb(237, 237, 237) inset !important;
} */
:deep(.van-dialog){
  width: 300px !important;
}

</style>
