<route lang="json5" type="page">
{
  style: {
    navigationBarTitleText: '提现记录',
    navigationBarBackgroundColor: '#fff',
  },
}
</route>
<template>
  <view class="min-h-screen pb-100">
    <template v-if="list.length">
      <view
        class="flex px-15 py-8 border-b border-#E5E5E5 border-b-solid"
        v-for="item in list"
        :key="item.id"
      >
        <image
          v-if="item.cash_type === 1"
          src="/static/images/invest/unionpay-icon.png"
          class="w-32 h-32 self-center"
        />
        <image
          v-if="item.cash_type === 2"
          src="/static/images/invest/alipay-icon.png"
          class="w-32 h-32 self-center"
        />
        <image
          v-if="item.cash_type === 3"
          src="/static/images/invest/wechat-icon.png"
          class="w-32 h-32 self-center"
        />
        <view class="flex flex-col flex-1 justify-between ml-15">
          <view class="text-14 text-#333">{{ typeName(item.cash_type) }}</view>
          <view class="text-12 text-#999">提现</view>
          <view class="text-12 text-#999">{{ item.create_time }}</view>
        </view>

        <view class="flex flex-col items-end">
          <view class="text-16 text-#FF5F5F">-{{ item.cash_money }} RMB</view>
          <view class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A">{{ item.message }}</view>
        </view>
      </view>
    </template>
    <template v-else>
      <wd-status-tip image="content" tip="暂无内容" />
    </template>
  </view>
</template>

<script setup lang="ts">
import { getWithdrawalRecordAPI } from '@/service'

const { list } = useListPageRequest(getWithdrawalRecordAPI)

const typeName = (item) => {
  return ['银行卡', '支付宝', '微信'][Number(item.card_type) - 1]
}
</script>
