<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>
|