heartNumber.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="我的爱心值" bgColor="transparent"></cus-header>
  4. <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>
  5. <view class="top">
  6. <view class="num">{{loveValue}}</view>
  7. <view class="text">我的爱心值</view>
  8. </view>
  9. <view class="list" v-if="list.length">
  10. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  11. <up-list-item v-for="(item, index) in list" :key="index">
  12. <view class="list-item">
  13. <view class="time">{{item.createDate||''}}</view>
  14. <view class="content adfacjb">
  15. <view class="left adfac">
  16. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/d5b79c0e-bcda-49ff-8cc5-5f6275b6bac1.png"></image>
  17. <view class="texts">
  18. <view class="p">{{transactionTypeDict[item.transactionType]||''}}</view>
  19. <view class="p tip">{{'报名参与公益实践活动'}}</view>
  20. </view>
  21. </view>
  22. <view class="right adfac">
  23. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/9d038c9c-268c-44ae-a396-949039c77f47.png" v-if="item.capitalFlow==2"></image>
  24. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/24/b6cbd075-f008-448a-ac9f-074787d08924.png" v-else></image>
  25. <text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.capitalFlow==2?'':'+'}}</text>
  26. <text :class="{'black':item.capitalFlow==2,'red':item.capitalFlow==1}">{{item.loveQuantity??0}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. </up-list-item>
  31. </up-list>
  32. </view>
  33. <view class="dataEmpty" v-else>
  34. <page-empty text="暂无爱心值记录"></page-empty>
  35. </view>
  36. </view>
  37. </template>
  38. <script setup name="">
  39. import CusHeader from '@/components/CusHeader/index.vue'
  40. import PageEmpty from '@/components/pageEmpty/index.vue'
  41. import { onLoad } from '@dcloudio/uni-app'
  42. import { ref, getCurrentInstance } from 'vue'
  43. const { proxy } = getCurrentInstance()
  44. const queryParams = ref({
  45. page:1,
  46. limit:10,
  47. userId:''
  48. })
  49. const transactionTypeDict = ref({
  50. 1:'渠道导入',
  51. 2:'公益捐赠'
  52. })
  53. const loveValue = ref(0)
  54. const isOver = ref(false)
  55. const list = ref([])
  56. const scrolltolower = () => {
  57. if(isOver.value) return
  58. getList()
  59. }
  60. const getList = () => {
  61. proxy.$api.get('/core/love/value/record/loveValueList',queryParams.value).then(({data:res})=>{
  62. if(res.code!==0) return proxy.$showToast(res.msg)
  63. list.value= [...list.value,...res.data.list];
  64. queryParams.value.page++
  65. if(res.data.list.length===0) isOver.value = true;
  66. })
  67. }
  68. onLoad(options=>{
  69. loveValue.value = options.loveValue??0;
  70. queryParams.value.userId = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).id;
  71. getList()
  72. })
  73. </script>
  74. <style scoped lang="scss">
  75. .common_page{
  76. padding-bottom: 20rpx;
  77. box-sizing: border-box;
  78. .top{
  79. padding: 93rpx 64rpx 0;
  80. height: 296rpx;
  81. box-sizing: border-box;
  82. position: relative;
  83. .num{
  84. font-family: DINAlternate, DINAlternate;
  85. font-weight: bold;
  86. font-size: 88rpx;
  87. color: #151B29;
  88. line-height: 103rpx;
  89. }
  90. .text{
  91. font-family: PingFangSC, PingFang SC;
  92. font-weight: 400;
  93. font-size: 28rpx;
  94. color: #151B29;
  95. line-height: 30rpx;
  96. margin-top: 11rpx;
  97. }
  98. }
  99. .list{
  100. position: relative;
  101. flex: 1;
  102. overflow-y: auto;
  103. width: calc(100% - 48rpx);
  104. margin: 0 auto;
  105. background: #FFFFFF;
  106. border-radius: 24rpx;
  107. padding: 6rpx 24rpx 40rpx;
  108. box-sizing: border-box;
  109. &-item{
  110. padding: 36rpx 0;
  111. border-bottom: 1rpx solid #E7E7E7;
  112. .time{
  113. font-family: PingFangSC, PingFang SC;
  114. font-weight: 400;
  115. font-size: 24rpx;
  116. color: #989998;
  117. line-height: 24rpx;
  118. }
  119. .content{
  120. margin-top: 36rpx;
  121. .left{
  122. flex: 1;
  123. image{
  124. width: 64rpx;
  125. height: 64rpx;
  126. }
  127. .texts{
  128. margin-left: 20rpx;
  129. .p{
  130. font-family: PingFangSC, PingFang SC;
  131. font-weight: 400;
  132. font-size: 32rpx;
  133. color: #151B29;
  134. line-height: 32rpx;
  135. &.tip{
  136. font-size: 24rpx;
  137. color: #676775;
  138. line-height: 24rpx;
  139. margin-top: 20rpx;
  140. }
  141. }
  142. }
  143. }
  144. .right{
  145. width: 200rpx;
  146. justify-content: flex-end;
  147. image{
  148. width: 24rpx;
  149. height: 22rpx;
  150. margin-right: 10rpx;
  151. }
  152. text{
  153. font-family: DINAlternate, DINAlternate;
  154. font-weight: bold;
  155. font-size: 36rpx;
  156. line-height: 42rpx;
  157. &.black{
  158. color: #151B29;
  159. }
  160. &.red{
  161. color: #F4657A;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. }
  169. </style>