| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title="我的爱心值" bgColor="transparent"></cus-header>
- <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/19f555c2-ee0a-437b-8871-42b5605f8a8b.png" class="top_bg_img" mode="widthFix"></image>
- <view class="top">
- <view class="num">{{loveValue}}</view>
- <view class="text">我的爱心值</view>
- </view>
- <view class="list" v-if="list.length">
- <up-list @scrolltolower="scrolltolower" style="height: 100%;">
- <up-list-item v-for="(item, index) in list" :key="index">
- <view class="list-item">
- <view class="time">{{item.createDate||''}}</view>
- <view class="content adfacjb">
- <view class="left adfac">
- <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/d5b79c0e-bcda-49ff-8cc5-5f6275b6bac1.png"></image>
- <view class="texts">
- <view class="p">{{transactionTypeDict[item.transactionType]||''}}</view>
- <view class="p tip">{{'报名参与公益实践活动'}}</view>
- </view>
- </view>
- <view class="right adfac">
- <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/9d038c9c-268c-44ae-a396-949039c77f47.png" v-if="item.capitalFlow==2"></image>
- <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/b6cbd075-f008-448a-ac9f-074787d08924.png" v-else></image>
- <text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.capitalFlow==2?'':'+'}}</text>
- <text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.loveQuantity??0}}</text>
- </view>
- </view>
- </view>
- </up-list-item>
- </up-list>
- </view>
- <view class="dataEmpty" v-else>
- <page-empty text="暂无爱心值记录"></page-empty>
- </view>
- </view>
- </template>
- <script setup name="">
- import CusHeader from '@/components/CusHeader/index.vue'
- import PageEmpty from '@/components/pageEmpty/index.vue'
- import { onLoad } from '@dcloudio/uni-app'
- import { ref, getCurrentInstance } from 'vue'
- const { proxy } = getCurrentInstance()
-
- const queryParams = ref({
- page:1,
- limit:10,
- userId:''
- })
- const transactionTypeDict = ref({
- 1:'渠道导入',
- 2:'公益捐赠'
- })
- const loveValue = ref(0)
- const isOver = ref(false)
- const list = ref([])
-
- const scrolltolower = () => {
- if(isOver.value) return
- getList()
- }
-
- const getList = () => {
- proxy.$api.get('/core/love/value/record/loveValueList',queryParams.value).then(({data:res})=>{
- if(res.code!==0) return proxy.$showToast(res.msg)
- list.value= [...list.value,...res.data.list];
- queryParams.value.page++
- if(res.data.list.length===0) isOver.value = true;
- })
- }
-
- onLoad(options=>{
- loveValue.value = options.loveValue??0;
- queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
- getList()
- })
- </script>
- <style scoped lang="scss">
- .common_page{
- padding-bottom: 20rpx;
- box-sizing: border-box;
- .top{
- padding: 93rpx 64rpx 0;
- height: 296rpx;
- box-sizing: border-box;
- position: relative;
- .num{
- font-family: DINAlternate, DINAlternate;
- font-weight: bold;
- font-size: 88rpx;
- color: #151B29;
- line-height: 103rpx;
- }
- .text{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #151B29;
- line-height: 30rpx;
- margin-top: 11rpx;
- }
- }
- .list{
- position: relative;
- flex: 1;
- overflow-y: auto;
- width: calc(100% - 48rpx);
- margin: 0 auto;
- background: #FFFFFF;
- border-radius: 24rpx;
- padding: 6rpx 24rpx 40rpx;
- box-sizing: border-box;
- &-item{
- padding: 36rpx 0;
- border-bottom: 1rpx solid #E7E7E7;
- .time{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #989998;
- line-height: 24rpx;
- }
- .content{
- margin-top: 36rpx;
- .left{
- flex: 1;
- image{
- width: 64rpx;
- height: 64rpx;
- }
- .texts{
- margin-left: 20rpx;
- .p{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 32rpx;
- color: #151B29;
- line-height: 32rpx;
- &.tip{
- font-size: 24rpx;
- color: #676775;
- line-height: 24rpx;
- margin-top: 20rpx;
- }
- }
- }
- }
- .right{
- width: 200rpx;
- justify-content: flex-end;
- image{
- width: 24rpx;
- height: 22rpx;
- margin-right: 10rpx;
- }
- text{
- font-family: DINAlternate, DINAlternate;
- font-weight: bold;
- font-size: 36rpx;
- line-height: 42rpx;
- &.black{
- color: #151B29;
- }
- &.red{
- color: #F4657A;
- }
- }
- }
- }
- }
- }
- }
- </style>
|