recordItem.vue 1.49 KB
<template>
  <div class="record-item">
    <img src="@/assets/images/消费.png" />
    <div class="item" style="flex:2;margin-left:10px">
      <span style="font-size:14px;color:#333333">提现</span>
      <span style="font-size:12px;color:#999999">{{
        recordItem.moneyTime
      }}</span>
    </div>
    <div class="item" style="flex:1">
      <span style="font-size:16px;font-weight:bold;#333333;"
        >{{ recordItem.money }}</span
      >
      <span :class="`status-process`" style="font-size:12px">{{
        recordItem.status | cashOutStatus
      }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "RecordItem",
  props: {
    recordItem: {
      type: Object,
      default: () => {}
    }
  },
  filters: {
    cashOutStatus(val) {
      let statusStr = "";
      switch (val) {
        case 2:
          statusStr = "银行处理中";
          break;
        case 3:
          statusStr = "提现成功";
          break;
        default:
          statusStr = "";
          break;
      }
      return statusStr;
    }
  }
};
</script>

<style lang="scss" scoped>
.record-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 15px;
  width: 100%;
  height: 44px;
  img {
    width: 34px;
    height: 34px;
  }
  .item {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
  }
  .status-process {
    // 银行处理中
    color: #88c678;
  }
  .status-success {
    color: #999999;
  }
}
</style>