<template>
	<view class="page-container">
		<uni-table border stripe emptyText="暂无提现记录">
			<uni-tr>
				<uni-th>时间</uni-th>
				<uni-th>银行卡</uni-th>
				<uni-th>金额(元)</uni-th>
				<uni-th>状态</uni-th>
			</uni-tr>
			<uni-tr v-for="(item, index) in list" :key="index">
				<uni-td>
					{{ item.dtCreateTime.slice(0, 10) }}
					{{ item.dtCreateTime.slice(11, 19) }}
				</uni-td>
				<uni-td>
					尾号 {{ item.bankAccount.slice(-4) }}
				</uni-td>
				<uni-td>
					{{ item.dPrice }}
				</uni-td>
				<uni-td>
					{{ item.nStatus == 0 ? '审核中' : item.nStatus == 1 ? '审核通过' : item.nStatus == 2 ? '驳回' : '' }}
				</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
import { getTXRecordData } from '@/api/index.js';
export default {
	data() {
		return {
			list: []
		}
	},
	onShow() {
		this.getList();
	},
	methods: {
		getList() {
			let params = {
				cOpenId: uni.getStorageSync('wx_copenid')
			}
			getTXRecordData(params).then(res => {
				if (res.data.code == 200) {
					this.list = res.data.data.records
				}
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.page-container {
	width: 100%;
	height: 100%;
	overflow-y: auto;
}
</style>