<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 { Toast, Dialog, Tabbar, TabbarItem} from 'vant';
import { Getter, Action } from 'vuex-class';

@Component({
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
})
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('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: #2c3e50;
}
html{
  // background: #F9FBFF;
  background: #f9f9f9;
}
</style>
