<template>
	<view class="center">
		<scroll-view scroll-y style="height:100%;">
			<view v-if="list.length!=0" v-for="(item, index) in list" :key="index">
				<view class="flex-column fs-24 mb-20" style="text-align: left;">
					<text class="fs-28 h-80 lh-80 plr-25"
						style="background:#F2F2F2;">{{item.updateTime.slice(0, 7)}}</text>
					<view class="flex-row-between plr-25 mtb-20">
						<text style="color: #999999;">缴费渠道：线上缴费</text>
						<text>{{item.payAmount}}</text>
					</view>
					<text class="plr-25" style="color: #999999;">{{item.updateTime.slice(5)}}</text>
				</view>
			</view>
			<view v-if="list.length==0" style="padding-top: 300rpx;">
				<u-empty mode="data"></u-empty>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: '',
				list: [],
			};
		},
		onLoad(options) {
			this.type = options.type
			this.getList()

		},
		methods: {
			getList() {
				const params = {
					url: '/api/payRecord/listAll?type=' + this.type,
					method: 'GET',
				}
				this.$request(params).then(res => {
					this.list = res.data
				})
			},
		}
	};
</script>

<style>
	.center {
		height: 100vh;
		display: flex;
		flex-direction: column;
		background: white;
		overflow-y: auto;
	}
</style>