<template>
	<view class="">
		<empty v-if="loaded === true && list.length === 0"></empty>
		<view class="order-item flex" v-for="(item, index) in list" :key="index">
			<view class="title-box">
				
				<view class="title">
					<text>姓名：{{ item.real_name }}</text>
				</view>
				<view class="title">
					<text>提现账户：{{ item.bank_code }}</text>
				</view>
				<view class="title">
					<text>提现金额：{{ item.extract_price }}</text>
				</view>
				<view class="time">
					 提现手续费：{{item.commission}}
				</view>
				<view class="time">
					<text>{{ item.add_time }}</text>
				</view>
			</view>
			<view class="money">
				<text>{{item.status == 0? "待审核": (item.status == 1 ? "已通过": "已拒绝")}}</text>
			</view>
		</view>
		<uni-load-more :status="loadingType" v-if="!(loaded === true && list.length === 0)"></uni-load-more>
	</view>
</template>

<script>
	import empty from '@/components/empty';
	
	import { awdList } from '@/api/user.js';
	export default {
		components: {
			empty
		},
		data() {
			return {
				list: '',
				page: 1,
				limit: 10,
				loadingType: 'more',
				loaded: false
			}
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.getList()
		},
		methods: {
			getList() {
				if(this.loadingType == 'noMore' ||this.loadingType == 'loading' ) return;
				this.loadingType = 'loading'
				awdList({
					page: this.page,
					limit: this.limit
				}).then(res => {
					this.list = res.data.list
					this.page++
					if(res.data.list.length == this.limit ) {
						this.loadingType = 'more'
						
					}else {
						this.loadingType = 'noMore'
					}
					this.loaded = true
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.order-item:last-child {
		// margin-bottom: 60rpx;
		border-bottom: none;
	}
	.order-item {
		padding: 20rpx 30rpx;
		line-height: 1.5;
		background-color: #fff;
		border-bottom: 1px solid #eee;
		.title-box {
			.title {
				font-size: $font-lg;
				color: $font-color-base;
			}
			.time {
				font-size: $font-base;
				color: $font-color-light;
			}
		}
		.money {
			color: #fd5b23;
			font-size: $font-lg;
			text-align: right;
			.status {
				color: $font-color-light;
			}
		}
	}
</style>