<template>
	<view class="app-container">
		<u-gap height="10rpx" bgColor="#F7F7F7"></u-gap>
		<view class="his-content">
			<view class="his-item u-border-bottom" v-for="(item,index) in withdrawList" :key="item.id">
				<view class="hit-left">
					<view class="his-name">
						流水号: {{item.out_biz_no}}
					</view>
					<view class="his-state" v-if="item.status==0">
						审核中
					</view>
					<view class="his-state" v-if="item.status==1" style="color:green">
						提现成功
					</view>
					<view class="his-state" v-if="item.status==2" style="color:red">
						审核不通过：{{item.review_remark}}
					</view>
					<view class="his-time">
						申请时间：{{item.created_at}}
					</view>
					<view class="his-time">
						审核时间：{{item.reviewed_at}}
					</view>
					<view class="his-time">
						提现金额：￥{{item.amount}}
					</view>
					<view class="his-time">
						扣手续费：￥{{item.fee}}
					</view>
					<view class="his-time">
						实际到账：￥{{item.receive_amount}}
					</view>
				</view>
<!-- 				<view class="hit-right">
					<view class="amount">提现金额：￥{{item.amount}}</view>
					<view class="fee">手续费：￥{{item.fee}}</view>
					<view class="receive-amount">实到账：￥{{item.receive_amount}}</view>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	import {
		userWithdrawList
	} from '../../common/api.js'

	export default {
		data() {
			return {
				withdrawList: [],
			};
		},
		onLoad() {
			this.getWithdrawList()
		},
		methods: {
			getWithdrawList() {
				userWithdrawList({
					page: 1,
					page_size: 15,
				}).then(data => this.withdrawList = data.list)
			}
		}
	}
</script>

<style lang="scss">
	.his-content {
		padding: 0 30rpx;

		.his-item {
			display: flex;
			justify-content: space-between;
			padding: 30rpx 0 30rpx;

			.hit-left {

				.his-name {
					color: #454545;
					font-size: 12px;
					line-height: 1.8;
					font-weight: bold;
				}

				.his-state {
					color: #666;
					font-size: 12px;
					line-height: 1.8;
				}

				.his-time {
					color: #999;
					font-size: 12px;
					line-height: 1.8;
				}
			}

			.hit-right {
				font-size: 14px;
				color: #454545;
				font-weight: bold;
				
				.amount {
					font-size: 14px;
				}
				
				.fee {
					font-size: 14px;
				}
				
				.receive_amount {
					font-size: 14px;
				}
			}
		}

		.u-border-bottom,
		.u-border-top {
			border-color: #eee !important;
		}
	}
</style>