<template>
        <div class='flex items-center justify-around pb-6 pt-3 bg-white text-font-white text-2xs shadow' >
            <div class='flex flex-col items-center' @click="setNav('Home')">
                <app-icon name='icon-shouye' size='22px' :color='actived==="Home"?"#707070":"#cdcdcd"'></app-icon>
                <!-- <div class='mt-2' :class='actived==="Home"?" text-font-blue":" text-white"'>大厅</div> -->
            </div>
            <div class='flex flex-col items-center relative' @click="goNFT">
                <app-icon name='icon-fahangnft' size='33px' color="#1296db"></app-icon>
                <!-- <div class=' absolute -top-12 rounded-full p-5  bg-app-red mx-auto  shadow-nav text-center'>
                    <app-icon name='icon-NFTfahang' size='28px' color='#fff' ></app-icon>
                </div>
                <div class='mt-8 text-font-red'>发行NFT</div> -->
            </div>
            <div class='flex flex-col items-center' @click="setNav('Mine')">
                <app-icon name='icon-wode' size='22px' :color='actived==="Mine"?"#707070":"#cdcdcd"'></app-icon>
                <!-- <div class='mt-2' :class='actived==="Mine"?" text-font-blue":" text-white"'>我的</div> -->
            </div>
        </div>
</template>

<script lang="ts">
import Vue from 'vue';
import { token } from '@/util/userInfoUtils'

export default Vue.extend({
  name: 'layout_one',
  data(){
      return{
          actived:this.$route.name
      }
  },
  components:{
      'app-icon':()=>import('@/components/common/Icon.vue')
  },
  methods:{
      goNFT(){
      if(!token.getToken()){
        this.$router.push('/auth/login')
        return 
      }
      this.$router.push({
        name:'createNft',
        query:{
          id:'1'
        }
      })
        //   this.$store.commit('app/TOGGLE_OVERLAY')
      },
      setNav(item:any){
          if(this.$route.name != item){
              this.actived = item
              this.$router.push(`/${item}`)
          }
      }
  }
});
</script>

<style lang="less">

</style>
