canCashOut.vue 4.3 KB
Newer Older
xulili's avatar
xulili committed
1 2 3 4 5 6 7 8 9 10 11 12
<template>
  <div class="can-cash-out">
    <div class="nav">
      <van-icon
        name="arrow-left"
        size="20"
        class="nav-left"
        @click="$router.go(-1)"
      />
      <span class="nav-title">可提现</span>
    </div>
    <div class="cash-panel-nums">
leiqingsong's avatar
leiqingsong committed
13 14 15 16
      <div class="cash-panel">
        <div class="cash-nums">
          <span class="cash-num">{{ preNum }}</span>
          <span class="cash-label">上月未提</span>
xulili's avatar
xulili committed
17
        </div>
leiqingsong's avatar
leiqingsong committed
18 19 20 21 22
        <div class="cash-nums">
          <span class="cash-num">{{ currentNum }}</span>
          <span class="cash-label">本月可提</span>
        </div>
      </div>
xulili's avatar
xulili committed
23 24
    </div>
    <div class="cash-rules">
leiqingsong's avatar
leiqingsong committed
25 26
      <div class="cash-rule-content">
        <p>{{ rules }}</p>
27 28 29 30 31
        <p>{{ rulesMent }}</p>
        <p>{{ rulesWith }}</p>
        <p>{{ rulesPoundage }}</p>
        <p>{{ rulesTax }}</p>
        <p>{{ rulesAttribution }}</p>
leiqingsong's avatar
leiqingsong committed
32
      </div>
xulili's avatar
xulili committed
33 34 35 36 37
    </div>
  </div>
</template>

<script>
leiqingsong's avatar
leiqingsong committed
38 39
import { getWithdrawalAmount } from "@/api/wallet";

xulili's avatar
xulili committed
40
export default {
leiqingsong's avatar
leiqingsong committed
41
  name: "CanCashOut",
xulili's avatar
xulili committed
42 43
  data() {
    return {
leiqingsong's avatar
leiqingsong committed
44 45
      preNum: "125",
      currentNum: "325",
leiqingsong's avatar
leiqingsong committed
46 47 48 49 50 51 52 53
      rules: "提现规则:",
      rulesMent:
        "1、结算:所有购买及推广产生的佣金实时结算,月度肥料及进步奖每月1号结算上个月收益,在APP我的收益页面可随时查询收益情况。",
      rulesWith:
        "2、提现:可提现部分为结算后已通过平台审核的佣金,佣金审核周期为1-15个工作日,审核通过后可实时提现。",
      rulesPoundage: "3、手续费:提现无需手续费。",
      rulesTax: "4、税费:提现时系统自动扣除2%个人所得税,剩余税费由平台替缴。",
      rulesAttribution: "此规则最终解释权归西田森市场运营部所有"
leiqingsong's avatar
leiqingsong committed
54
    };
xulili's avatar
xulili committed
55
  },
leiqingsong's avatar
leiqingsong committed
56 57 58 59 60 61
  mounted() {
    this.getWithdrawal();
  },
  methods: {
    getWithdrawal() {
      const params = {
leiqingsong's avatar
leiqingsong committed
62
        userId: this.$userId
leiqingsong's avatar
leiqingsong committed
63
      };
leiqingsong's avatar
leiqingsong committed
64 65 66
      getWithdrawalAmount(params).then(res => {
        if (res.code === 0) {
          this.preNum = res.data.lastMoneyNot;
leiqingsong's avatar
leiqingsong committed
67
          this.currentNum = res.data.currentMoneyCan;
leiqingsong's avatar
leiqingsong committed
68 69
          this.rules = res.data.withdrawRule;
        }
leiqingsong's avatar
leiqingsong committed
70
      });
leiqingsong's avatar
leiqingsong committed
71 72
    }
  }
xulili's avatar
xulili committed
73 74 75 76 77
};
</script>

<style lang="scss" scoped>
$white: #ffffff;
leiqingsong's avatar
leiqingsong committed
78
.can-cash-out {
xulili's avatar
xulili committed
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
  width: 100%;
  height: 298px;
  background-image: url("../assets/images/森林状态.png");
  background-size: cover;
  .nav {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 46px;
    color: #fff;
    .nav-left {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 52px;
      height: 100%;
      line-height: 46px;
      text-align: center;
    }
    .nav-title {
      max-width: 60%;
      margin: 0 auto;
      font-weight: bold;
      font-size: 16px;
    }
  }
leiqingsong's avatar
leiqingsong committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
  .cash-panel-nums {
    padding: 25px 15px 0px 15px;
    box-sizing: border-box;
    .cash-panel {
      height: 98px;
      background-color: #ffffff;
      box-shadow: 0px 2px 12px 0px rgba(6, 0, 1, 0.04);
      border-radius: 4px;
    }
    .cash-nums {
      width: 50%;
      text-align: center;
      display: inline-block;
      padding: 22px 0;
      position: relative;
      &:first-child {
        &::before {
          width: 1px;
          height: 50px;
          content: "";
          background-color: #eeeeee;
          position: absolute;
          right: 0;
          top: 50%;
          margin-top: -25px;
        }
xulili's avatar
xulili committed
132
      }
leiqingsong's avatar
leiqingsong committed
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
      span {
        display: block;
        &.cash-num {
          font-size: 26px;
          font-weight: normal;
          font-stretch: normal;
          line-height: 27px;
          letter-spacing: 0px;
          color: #333333;
        }
        &.cash-label {
          font-size: 14px;
          color: #666;
          line-height: 27px;
        }
xulili's avatar
xulili committed
148
      }
leiqingsong's avatar
leiqingsong committed
149
    }
xulili's avatar
xulili committed
150
  }
leiqingsong's avatar
leiqingsong committed
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
  .cash-rules {
    padding: 10px 15px 15px 15px;
    box-sizing: border-box;
    height: calc(100vh - 220px);
  }
  .cash-rule-content {
    background-color: #ffffff;
    padding: 20px 15px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 0px 2px 12px 0px rgba(6, 0, 1, 0.04);
    border-radius: 4px;
    p {
      font-family: PingFang-SC-Regular;
      font-size: 14px;
      font-weight: normal;
      font-stretch: normal;
      line-height: 21px;
      letter-spacing: 0px;
170
      color: #999999;
leiqingsong's avatar
leiqingsong committed
171 172
      text-indent: 2em;
    }
xulili's avatar
xulili committed
173 174 175
  }
}
</style>