1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
| <template>
| <view class="content">
| <view class="cell">
| <view class="cell-item" v-for="(item,index) of list" :key="index">
| <view class="cell-item-info">
| <view class="cell-item-info-text">{{item.name}}</view>
| <view class="cell-item-info-time">{{item.createTime | getTime}}</view>
| </view>
| <view class="cell-item-num">{{item.state == 2?'-':"+"}}{{item.money }}饮水币</view>
| </view>
| </view>
| <view class="nomore" v-if="!loading && !list.length">
| <u-loadmore status="nomore" />
| </view>
| <u-loading-page :loading="loading"></u-loading-page>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| loading:true,
| t:'',
| list:[],
| page:1,
| };
| },
| onLoad(o) {
| if(o.t){
| this.t = o.t
| uni.setNavigationBarTitle({
| title:o.title
| })
| this.init()
| }
| },
| onPullDownRefresh() {
| this.page = 1
| this.init()
| },
| onReachBottom() {
| this.page ++
| this.init()
| },
| methods:{
| init(){
| this.$apis.user.getJLrecharge({state:this.t,pageNum:this.page,pageSize:20}).then(res=>{
| if(this.page == 1){
| this.list = res.data
| }else{
| this.list = [...this.list,...res.data]
| }
| this.loading = false
| uni.stopPullDownRefresh()
| })
| }
| }
| }
| </script>
|
| <style lang="scss">
| .content{
| padding: 0 28rpx;
| .cell{
| .cell-item{
| height: 128rpx;
| display: flex;
| align-items: center;
| border-bottom: 2rpx solid rgba(217, 217, 217, 0.4);
| .cell-item-info{
| flex: 1;
| .cell-item-info-text{
| font-size: 31rpx;
| color: #000000;
| line-height: 42rpx;
| }
| .cell-item-info-time{
| font-size: 23rpx;
| color: rgba(0, 0, 0, .4);
| line-height: 23rpx;
| margin-top: 10rpx;
| }
| }
| .cell-item-num{
| font-size: 27rpx;
| color: rgba(0, 0, 0, .8);
| line-height: 38rpx;
| }
| }
| }
| }
| </style>
|
|