<template>
  <div id="app">
    <!-- <keep-alive :exclude="/^[a-zA-Z]*Detail$/"> -->
    <router-view></router-view>
    <!-- </keep-alive> -->
  </div>
</template>

<script lang="ts">
import { Component, Vue, Provide } from 'vue-property-decorator';
import { Getter, Action } from 'vuex-class';

@Component({})
export default class App extends Vue {
  @Provide('isSy') private isSy: boolean =
    process.env.VUE_APP_CATEGORY !== 'cs';
  @Provide('APP-NAME') private APP_NAME: string = process.env.VUE_APP_NAME;
  @Action('getUserInfo') private getUserInfo!: () => void;
  @Provide('getProofViewingWebSite') private getProofViewingWebSite = (
    proof: any
  ): string => process.env.VUE_APP_BROWSER + `/product?hash=${proof.hash}`;
  @Provide('goToBrowser') private goToBrowser: (proof: any) => void = (
    proof: any
  ) => {
    location.href = process.env.VUE_APP_BROWSER + `/product?hash=${proof.hash}`;
  };
  private mounted() {
    this.getUserInfo();
  }
}
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #353535;

  .van-dialog {
    border-radius: 10px;
    .van-dialog__header {
      padding-left: 16px;
      text-align: left;
      color: #353535;
      font-weight: 500;
    }
    .van-field__body {
      border-bottom: 1px solid #f0f1f5;
      .van-field__control {
        line-height: 40px;
      }
    }
    .van-cell::after {
      border-bottom: 0;
    }
    [class*='van-hairline']::after {
      border: 0;
    }
    .van-dialog__footer {
      justify-content: space-evenly;
      margin: 10px 0 20px;
      .van-button {
        border: 1px solid #d7d7d7;
        box-sizing: border-box;
        width: 140px;
        height: 45px;
        flex: none;
        border-radius: 4px;
      }

      .van-dialog__confirm {
        border: 0;
        background: linear-gradient(180deg, #6c7afe 0%, #5d7bf6 100%);
        color: #ffffff;
      }
    }
  }
}

html {
  // background: #F9FBFF;
  // background: #f9f9f9;
}
</style>
