<template>
  <div id="app":class="{ 'isCq':isCq }" >
    <div
      :class="{
        'nsgk-global-main':
          !$route.meta.hidden || $route.meta.hidden == undefined,
      }"
    >
      <keep-alive>
        <router-view v-if="$route.meta.keepAlive" />
      </keep-alive>
      <router-view
        v-if="!$route.meta.keepAlive || $route.meta.keepAlive == undefined"
      />
      <navFooter
        v-if="!$route.meta.hidden || $route.meta.hidden == undefined"
      ></navFooter>
    </div>

    <!-- <div
      class="nsgk-global-main"
      v-if="!$route.meta.hidden || $route.meta.hidden == undefined"
    >
      <transition
        :name="
          direction == ''
            ? ''
            : 'fade-' + (direction === 'forward' ? 'last' : 'next')
        "
      >
        <router-view />
      </transition>
      <navFooter></navFooter>
    </div>
    <div class="nsgk-noNav-main" v-else>
      <transition
        :name="
          direction == ''
            ? ''
            : 'fade-' + (direction === 'forward' ? 'last' : 'next')
        "
      >
        <router-view />
      </transition>
    </div> -->
  </div>
</template>

<script>
import navFooter from "@/components/common/nav_footer";
export default {
  name: "App",
  components: { navFooter },
  data: () => {
    return {
      // direction: "",
      isCq:false
    };
  },
  mounted() {

  },
  watch: {
    $route(to, from) {
      let toName = to.name;
      // 判断当前页面的路由
      if (toName&&toName.indexOf('CJ')>-1) {
        this.isCq = true;
      }
    },
  },
};
</script>

<style lang="scss" >
@import "./assets/css/base";

:root{
  --transform: scale(1.15);
  --fontSize: 0.35rem;
  /*--color:#e8041f;*/
}
.nsgk-global-main {
  min-height: 100vh;
  padding-bottom: 110px;
}
p,span,.van-cell__title,.van-col{
  /*transform: var(--transform)!important;*/
  font-size: var(--fontSize)!important;
}
// .fade-last-enter-active {
//   animation: bounce-in 0.6s;
// }
// .fade-next-enter-active {
//   animation: bounce-out 0.6s;
// }
// @keyframes bounce-in {
//   0% {
//     transform: translateX(-100%);
//   }
//   100% {
//     transform: translateX(0rem);
//   }
// }
// @keyframes bounce-out {
//   0% {
//     transform: translateX(100%);
//   }
//   100% {
//     transform: translateX(0rem);
//   }
// }
</style>
