<template>
  <div class="li" @click="popShow">
    <div class="top flex">
      <div class="tag">
        <!-- 存款通知 -->
        {{ $t('inform.l38') }}
      </div>
      <div class="title" v-if="item.content.status == 3">
        <!-- 您的存款已驳回 -->
        {{ $t('inform.l39') }}
      </div>
      <div class="title" v-if="item.content.status == 100">
        <!-- 您的存款已到账 -->
        {{ $t('inform.l40') }}
      </div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 存款账户 -->
        {{ $t('inform.l41') }}
      </div>
      <div class="text">{{ serverName[item.content.from.server] || $t('account.l1') }}</div>
    </div>
    <div class="row" v-if="false">
      <div class="label">
        <!-- 存款渠道 -->
        {{ $t('inform.l42') }}
      </div>
      <div class="text">{{ serverName[item.content.from.server] || $t('account.l1') }}</div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 存款数量 -->
        {{ $t('inform.l43') }}
      </div>
      <div class="text">{{$numToThousand(item.content.amount)}} USD</div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 存款状态 -->
        {{ $t('inform.l44') }}
      </div>
      <div class="text">{{ statusText[item.content.status] || statusText['100'] }}</div>
    </div>
    <van-popup get-container="body" v-model="popup" round :style="{ width: '324px' }" @close="cancel">
      <depositPop :item="item" @cancel="cancel"/>
    </van-popup>
  </div>
</template>
<script>
import depositPop from "./pop/depositPop.vue";
export default {
  props: ['item'],
  components: {
    depositPop
  },
  data () {
    return {
      popup: false,
      statusText: {
        // '1': '未支付',
        // '2': '待审核',
        // '3': '已驳回',
        // '4': '处理中',
        // '5': '已撤销',
        // '100': '已完成',
        '1': this.$t('ajax.201'),
        '2': this.$t('ajax.350'),
        '3': this.$t('ajax.408'),
        '4': this.$t('ajax.401'),
        '5': this.$t('ajax.404'),
        '100': this.$t('ajax.403'),
      },
    }
  },
  methods: {
    popShow() {
      if (this.item.content.status != 100) {
        return
      }
      this.popup = true
    },
    cancel(){
      this.popup = false
    }
  }
}
</script>
<style lang="less" scoped>
.tag {
  border: 1px solid rgba(181, 34, 229, 0.25);
  color: #B522E5;
}
</style>