<template>
	<view class="container">
		<view v-if="emptyType==0">
			<view v-for="item in dataList" class="item">
				<view class="item-left">
					<image :src="item.member.icon?item.member.icon:''" mode="aspectFit"></image>
					<view class="item-name">{{item.member.username}}</view>
					<view class="item-tel">{{item.member.mobile}}</view>
				</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: {
			DtNoMore,
			DtEmpty
		},
		data() {
			return {
				memberId:'',
				dataList:[]
			};
		},
		
		methods:{
			onLoadPage(options) {
				uni.setNavigationBarTitle({
				　　title:options.title+'邀请的人'
				})
			  this.memberId = options.id
			  this.getData();
			},
			async getData(){
				let resp = await this.$api.distributorGetInvites({
					_isShowLoading: true,
					memberId:this.memberId,
					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);
			.item-left{
				display: flex;
				align-items: center;
				image{
					width:66upx;
					height:66upx;
					border-radius:50%;
					background-color: gray;
					margin-right: 21upx;
					display: block;
				}
				.item-name{
					width: 120upx;
					font-size:30upx;
					font-family:PingFang SC;
					font-weight:400;
					color:rgba(51,51,51,1);
				}
				.item-tel{
					font-size:24upx;
					font-family:PingFang SC;
					font-weight:400;
					color:rgba(153,153,153,1);
				}
			}
		}
	}
</style>
