<template> <view class="user"> <view class="user-bd"> <view class="li" v-for="(a,i) in list" :key="i"> <view class="l"> <image v-if="a.invitee.money" :src="a.invitee.money"></image> <image v-else :src="$picUrl+'/static/news/avater.png'"></image> </view> <view class="m"> <view class="n">{{a.invitee.nick_name}}</view> <view class="t">{{a.create_time}}</view> </view> <view class="r"> +<text>{{a.money}}元</text> </view> </view> </view> <view v-if="total == 0" style="margin-top: 250rpx;" > <u-empty text="暂无信息" mode="list"></u-empty> </view> </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 } }, } } </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>