<template>
  <div class="wallet" @click="_wallet">
    <div class="btn">
      <div class="icon"></div>
    </div>
    <div class="title">提现</div>
  </div>
</template>
<script>
import { mapGetters } from 'vuex';

export default {
  name: 'suspension-wallet',
  data() {
    return {};
  },
  computed: {
    ...mapGetters({
      type: 'type',
      channelInfo: 'channelInfo',
      userInfo: 'userInfo',
      jumpUrls: 'jumpUrls'
    })
  },
  methods: {
    _wallet() {
      if (!this.userInfo.id) {
        this.$layer.msg('请先登录');
        this.$Bus.$emit('bus-showLogin', true);
      } else {
        window.location.href = this.jumpUrls.center_wallet;
      }
    }
  }
};
</script>
<style lang="less" scoped>
.wallet {
  width: 0.8rem;
  height: 0.8rem;
  .btn {
    position: relative;
    padding: 0 0.1rem;
    width: 0.8rem;
    height: 0.6rem;
    background: var(--suspension-wallet-bg) no-repeat center center;
    background-size: contain;
    .icon {
      width: 100%;
      height: 100%;
      background: url(./img/icon-wallet.png) no-repeat center center;
      background-size: auto 60%;
    }
  }
  .title {
    margin-top: 0.02rem;
    line-height: 0.18rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.16rem;
    color: #666;
  }
}
</style>
