uniapp 结合uivew实现提现列表
<template>
<view class="u-page">
<u-list @scrolltolower="scrolltolower">
<u-list-item v-for="(item, index) in indexList" :key="index">
<div class="item">
<div class="item1">
<div class="item1l">[商品退款]{{index}}</div>
<div class="item1r">+1000</div>
</div>
<div class="item1 item2">
<div class="item2l">wm1622222222</div>
<div class="item2r">已完成</div>
</div>
<div class="item1 item3">
<div class="item3l">¥1.1</div>
<div class="item3r"></div>
</div>
<div class="item1 item4">
<div class="item4l">2022-01-10 11:23:42</div>
<div class="item4r"></div>
</div>
</div>
</u-list-item>
</u-list>
</view>
</template>
<script>
export default {
data() {
return {
indexList: [],
urls: [
null, null, null, null, null, null, null, null, null, null,
]
}
},
onLoad() {
this.loadmore()
},
methods: {
scrolltolower() {
this.loadmore()
},
loadmore() {
for (let i = 0; i < 30; i++) {
this.indexList.push({
url: this.urls[uni.$u.random(0, this.urls.length - 1)]
})
}
}
},
}
</script>
<style scoped lang="scss">
.item {
background: #fff;
padding-top: 20rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #F8F8F9;
.item1 {
width: 690rpx;
margin: 0 auto;
height: 60rpx;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
.item1l {
font-size: 24rpx;
color: #666;
}
.item1r {
font-size: 28rpx;
color: #666;
}
}
.item2 {
.item2l {
font-size: 24rpx;
color: #666;
}
.item2r {
font-size: 24rpx;
color: #E4A273;
}
}
.item3 {
.item3l {
font-size: 24rpx;
color: #666;
}
.item3r {
font-size: 24rpx;
color: #E4A273;
}
}
.item4 {
.item4l {
font-size: 24rpx;
color: #666;
}
.item4r {
font-size: 24rpx;
color: #E4A273;
}
}
}
</style>