<template>
  <div class="wallet">
    <div class="content">
      <img class="balance-img" src="@/assets/images/余额.png" alt />
      <p
        style="position:absolute;top:136px;width:100%;font-size:18px;color:#333333"
      >
        当月收益
      </p>
      <div style="position:absolute;top:178px;width:100%">
        <span class="month-income">1,285.35</span>
        <img
          src="@/assets/images/右箭头.png"
          alt
          style="width:11px;height:18px"
        />
      </div>
      <div class="bottom-box">
        <div class="income-item">
          <img src="@/assets/images/待结算.png" alt />
          <p>累计收益</p>
          <div>
            <span class="money">3525.35</span>
            <img
              src="@/assets/images/右箭头.png"
              alt
              style="width:8px;height:15px"
            />
          </div>
        </div>
        <div class="income-item">
          <img src="@/assets/images/累计收入.png" alt />
          <p>未提余额</p>
          <div>
            <span class="money">325.36</span>
            <img
              src="@/assets/images/右箭头.png"
              alt
              style="width:8px;height:15px"
            />
          </div>
        </div>
      </div>
      <div class="cash-out-btn">
        <van-button type="primary" color="#88c678" @click="onToCashOut"
          >提现</van-button
        >
        <p @click="onToRecord">查看提现记录</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Wallet",
  methods: {
    onToCashOut() {
      this.$router.push("/cash-out");
    },
    onToRecord() {
      this.$router.push("/cash-out-record");
    }
  }
};
</script>

<style lang="scss" scoped>
.wallet {
  box-sizing: border-box;
  height: 100vh;
  padding: 10px 16px;
  p {
    margin: 0;
  }
  .content {
    position: relative;
    width: 345px;
    height: 90%;
    text-align: center;
    background-color: #ffffff;
    .balance-img {
      position: absolute;
      top: 72px;
      left: 157px;
      width: 34px;
      height: 34px;
    }

    .month-income {
      margin-right: 10px;
      font-size: 28px;
      color: #333333;
    }

    .bottom-box {
      position: absolute;
      top: 263px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      width: 100%;
      font-size: 14px;
      color: #666666;
      img {
        width: 30px;
        height: 29px;
      }
      .income-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        height: 120px;
      }
      .money {
        font-size: 20px;
        color: #333333;
        margin-right: 10px;
      }
    }

    .cash-out-btn {
      position: absolute;
      bottom: 63px;
      left: 50%;
      transform: translateX(-50%);
      .van-button {
        width: 160px;
      }
      p {
        margin-top: 20px;
        font-size: 14px;
        color: #88c678;
      }
    }
  }
}
</style>
