Liuyi
2024-11-26 53dc2bac460d2ff210aa9523717753ae1fd2c159
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<script setup>
    import { onMounted, ref } from 'vue';
    import { pointsSearchApi } from '../../../api/index.js'
    const userInfo = JSON.parse(uni.getStorageSync('userInfo'))
    
    const pointList = ref([
        // {ruleName:'充值',integralAmount:1232,createTime:'2024-11-13 14:46:40'},
    ])
    async function searchPoints(){
        await pointsSearchApi({limit:10000,page:1,userId:userInfo.id}).then((res) =>{
            pointList.value = res.data.list
        })
    }
    onMounted(async() =>{
        await searchPoints()
    })
    
</script>
<template>
    <view class="container">
        <point-navbar title='积分记录'></point-navbar>
        <view class="content">
            <view class="main" v-if="pointList.length > 0">
                <block v-for="(item,index) in pointList">
                    <view class="item">
                        <view class="item-left">
                            <text class="methods">积分方式:{{item.ruleName}}</text>
                            <text>{{item.createTimeView}}</text>
                        </view>
                        <view class="item-right">
                            <text class="money">+{{item.integralAmount}}</text>
                            <image src="../../../static/images/pointMall/advert/money1.svg"></image>
                        </view>
                    </view>
                </block>
            </view>
            <view v-else class="nodata">
                <image src="../../../static/images/pointMall/noRecord.svg" alt=""></image>
                <text>暂无记录</text>
            </view>
        </view>
    </view>
</template>
 
<style lang="scss" scoped>
    
    .container{
       width:100%;
       height:100vh;
       .content{
           width:100%;
           height:calc(100vh - 176rpx);
           background:linear-gradient(to bottom,#fef7da,#FFF);
           padding:50rpx 32rpx 100rpx;
           box-sizing: border-box;
           .main{
                  width:99%;
                  height:calc(100% - 50rpx);
                  background: rgba(255,255,255,0.8);
                  box-shadow: 0 0 6rpx 2rpx #fbd1a2;
                  border-radius:20rpx;
                  margin: 0 auto;
                  padding:28rpx 48rpx;
                  box-sizing: border-box;
                  overflow: scroll;
                  .item{
                      width:100%;
                      height:130rpx;
                      border-bottom:1rpx solid #D8D8D8;
                      box-sizing:border-box;
                      padding-bottom:10rpx;
                      margin-bottom:10rpx;
                      justify-content:space-between;
                      align-items:flex-end;
                      display: flex;
                      .item-left{
                          height:100%;
                          display:flex;
                          flex-direction:column;
                          justify-content:flex-end;
                          align-items: flex-start;
                          text:first-child{
                            font-weight: 300;
                            font-size: 32rpx;
                            color: #000000;  
                            margin-bottom:20rpx;
                          }
                          .methods{
                            font-weight: 300;
                            font-size: 32rpx;
                            color: #474646;  
                          }
                          text:last-child{
                              font-weight: 300;
                              font-size: 24rpx;
                              color: #A7A7A7;
                          }
                      }
                      .item-right{
                          height:100%;
                          display:flex;
                          justify-content:flex-end;
                          align-items:flex-end;
                          image{
                            width:40rpx;
                            height:40rpx;
                            margin-left:5rpx;
                          }
                          .money{
                                font-weight: 500;
                                font-size: 32rpx;
                                color: #efab22;
                          }
                      }
                  }
       }
       .nodata{
                  
                  width:100%;
                  height:1200rpx;
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  padding-bottom:400rpx;
                  box-sizing: border-box;
                  flex-direction: column;
                  image{
                      width:300rpx;
                      height:300rpx;
                  }
                          
                  text{
                      color:#fbd1a2;
                  }
       }
    }
}
</style>