<template>
	<view class="container">
		<view v-if="emptyType==0">
			<view  v-for="item in dataList" class="item">
				<view class="date">{{item.createdDate}}</view>
				<view class="sum">+{{item.commission}}</view>
			</view>
		</view>
		<DtNoMore v-if="isNoMore" />
		<DtEmpty :type="emptyType" />
	</view>
</template>

<script>
	import DtNoMore from "../comps/dt_no_more.vue";
	import DtEmpty from '../comps/dt_empty.vue'
	export default {
		components: {
		  DtEmpty
		},
		data() {
			return {
				dataList:[]
			};
		},
		methods:{
			onLoadPage() {
			  this.getData()
			},
			async getData(){
				let resp = await this.$api.getDistributionCashRecords({
					_isShowLoading: true,
					pageNo:this.pageIndex,
					pageSize:this.pageSize,
				})
				let list = this.getDataList(resp)
				this.dataList = this.dataList.concat(list)
			},
		},
		onReachBottom() {
		  this.onReachBottomPage()
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		height: 100vh;
		border-top: 2upx solid rgba(238,238,238,1);
		.item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-left: 16upx;
			padding-left: 24upx;
			padding-right: 40upx;
			height: 108upx;
			background-color: #fff;
			border-bottom: 2upx solid rgba(238,238,238,1);
			.date{
				font-size:30upx;
				font-family:PingFang SC;
				font-weight:400;
				color:rgba(51,51,51,1);
			}
			.sum{
				font-size:36upx;
				font-family:PingFang SC;
				font-weight:500;
				color:rgba(51,51,51,1);
			}
		}
	}
</style>
