wallet.vue 2.98 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<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 />
leiqingsong's avatar
leiqingsong committed
33
          <p>未提余额</p>
34 35 36 37 38 39 40 41 42 43
          <div>
            <span class="money">325.36</span>
            <img
              src="@/assets/images/右箭头.png"
              alt
              style="width:8px;height:15px"
            />
          </div>
        </div>
      </div>
leiqingsong's avatar
leiqingsong committed
44 45 46 47 48 49
      <div class="cash-out-btn">
        <van-button type="primary" color="#88c678" @click="onToCashOut"
          >提现</van-button
        >
        <p @click="onToRecord">查看提现记录</p>
      </div>
50 51 52 53
    </div>
  </div>
</template>

leiqingsong's avatar
leiqingsong committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67
<script>
export default {
  name: "Wallet",
  methods: {
    onToCashOut() {
      this.$router.push("/cash-out");
    },
    onToRecord() {
      this.$router.push("/cash-out-record");
    }
  }
};
</script>

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
<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;
leiqingsong's avatar
leiqingsong committed
125
      bottom: 63px;
126 127
      left: 50%;
      transform: translateX(-50%);
leiqingsong's avatar
leiqingsong committed
128 129 130 131 132 133 134 135
      .van-button {
        width: 160px;
      }
      p {
        margin-top: 20px;
        font-size: 14px;
        color: #88c678;
      }
136 137 138 139
    }
  }
}
</style>