<template>
	<view class="user">
		<view class="user-bd">
			<view class="li" v-for="(a,i) in list" :key="i">
				<view class="l">
					<image :src="$picUrl+'/static/news/avater.png'"></image>
				</view>
				<view class="m">
					<view class="n">AUIIO</view>
					<view class="t">2023-02-12 10:00</view>
				</view>
				<view class="r">
					+<text>18元</text>
				</view>
			</view>
		</view>
		<u-empty text="暂无信息" v-if="total == 0" mode="list"></u-empty>
		<addShuiyin />
	</view>
</template>

<script>
	import * as newFunApi from '@/api/newFun'
	export default {
		data() {
			return {
				list: [],
				total: 1
			};
		},
		onLoad() {
			this.getList();
		},
		methods: {
			async getList() {
				uni.showLoading({
					title:"加载中"
				})
				const {status, data} = await newFunApi.inviteGetList({});
				if(status == 200){
					uni.hideLoading();
					this.list = data.list.data;
					this.total = data.list.total
					console.log(this.total)
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
.user{
	padding: 0 0 130rpx;
	overflow: hidden;
	&-bd{
		padding: 0 20rpx 0 60rpx;;
		background-color: #FFFFFF;
		overflow: hidden;
		margin-top: 20rpx;
		.li{
			display: flex;
			align-items: flex-start;
			justify-content: space-between;
			padding: 35rpx 0;
			border-bottom: 1px solid #F2F2F2;
			.l{
				width: 86rpx;
				height: 86rpx;
				margin-right: 25rpx;
				image{
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}
			.m{
				flex: 1;
				max-width: 400rpx;
				margin-right: 20rpx;
				.n{
					font-size: 28rpx;
					font-weight: 400;
					color: #545454;
				}
				.t{
					margin-top: 10rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: #A7A7A7;
				}
			}
			.r{
				font-size: 28rpx;
				color: #FF4C4B;
				text{
					font-size: 36rpx;
				}
			}
		}
	}
}
</style>
