<template>
	<view :class="[AppTheme]">
		<view v-if="txInfo.length" class="jl">
			<view v-for="(item, index) in txInfo" :key="index" class="borde-b">
				<view class="jl-c">
					<view class="sr" v-if="item.txtype == 0">银行</view>
					<view class="sr" v-if="item.txtype == 1">微信</view>
					<view class="sr" v-if="item.txtype == 2">支付宝</view>
					<view class="sr-p text-neutral">- ￥{{ item.txprice }}</view>
				</view>
				<view class="time">{{ item.txtime }}</view>
			</view>
		</view>
		<view v-else>
			<u-empty text="暂无记录" marginTop="0" mode="history"></u-empty>
		</view>
	</view>
</template>

<script>
	import wallApi from '@/api/wall/index.js';
	export default {
		data() {
			return {
				txInfo: [], //提现记录
				p: 1,
				pagesize: 10,
			}
		},
		onLoad() {
			this.getTxList()
		},
		methods: {
			getTxList() {
				wallApi.txRecord({
					p: this.p,
					pagesize: this.pagesize
				}).then(res => {

					if (res.status == 200) {
						this.txInfo = this.txInfo.concat(res.data);
						if (res.data.length === 0 || res.data.length < 10) {
							this.more = 'noMore';
						}
					} else {
						this.more = 'noMore';
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.jl {
		width: 100%;
		background-color: #ffffff;
		margin: 0 auto;
		padding-bottom: 20rpx;
		min-height: calc(100vh - 20rpx);

		.borde-b {
			padding-top: 30rpx;
			border-bottom: 2rpx solid #eeeeee;
		}

		.jl-c {
			display: flex;
			justify-content: space-between;
			margin: 0rpx 0 18rpx 0;
		}

		.sr {
			padding-left: 32rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: rgba(51, 51, 51, 1);
		}

		.sr-p {
			padding-right: 32rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: bold;
		}

		.time {
			padding-left: 32rpx;
			font-size: 24rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: rgba(153, 153, 153, 1);
			padding-bottom: 18rpx;
		}
	}
</style>
