<template>
  <div>
    <div class="title">
      <div>
        <!-- 分润账户管理 -->
        {{ $t('follow.l115') }}
      </div>
      <div class="right flex" @click="$router.push('/copy-profit')">
        <div>
          <!-- 分润明细 -->
          {{ $t('follow.l118') }}
        </div>
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="flex box">
      <div class="left flex">
        <div class="lab">
          <!-- 账户余额(USD) -->
          {{ $t('follow.l116') }}(USD)
        </div>
        <div>
          {{ $numToThousand(expertInfo.balance) }}
        </div>
      </div>
      <div class="btn" @click="settlementPop = true">
        <!-- 申请结算 -->
        {{ $t('follow.l117') }}
      </div>
    </div>
    <div class="tip">
      <!-- 申请结算后，账户余额将暂时被冻结，通过审核后，分润账户资金将转入您的美元钱包。 -->
      {{ $t('follow.l119') }}
    </div>
    <van-popup v-model="settlementPop" round position="bottom">
      <settlement @cancel="settlementPop = false" />
    </van-popup>
  </div>
</template>
<script>
import settlement from "./settlement.vue";
import { mapGetters } from "vuex";
export default {
  components: {
    settlement
  },
  data () {
    return {
      settlementPop: false
    }
  },
  computed: {
    ...mapGetters(['expertInfo']),
  },
}
</script>
<style lang="less" scoped>
.title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 10px;
  font-weight: 600;
  font-size: 16px;
  .right {
    cursor: pointer;
    font-weight: 400;
    font-size: 12px;
    .van-icon {
      margin-right: -2px;
    }
  }
}
.box {
  padding: 14px 0 10px;
  justify-content: space-between;
  column-gap: 13px;
  .left {
    min-width: 0px;
    max-width: 100%;
    column-gap: 20px;
  }
  .btn {
    cursor: pointer;
    padding: 7px 14px;
    font-size: 12px;
    color: #FFFFFF;
    background-color: #000;
    border-radius: 15px;
  }
}
.tip {
  font-size: 10px;
  color: #B6B6B6;
  line-height: 14px;
  padding-bottom: 8px;
}
</style>