detailsList.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <view>
  3. <view class="u-page">
  4. <up-list @scrolltolower="scrolltolower">
  5. <up-list-item v-for="(item, index) in listData" :key="index">
  6. <view class="withdrawal-item">
  7. <view class="main-info">
  8. <view class="left-section">
  9. <up-avatar
  10. shape="square"
  11. size="35"
  12. :src="item.url || ''"
  13. customStyle="margin: -3px 5px -3px 0"
  14. ></up-avatar>
  15. <view class="info-content">
  16. <view class="name-account">
  17. <text class="name">支付宝姓名:{{ item.alipayName }}</text>
  18. <text class="account">支付宝账户:{{ item.alipayAccountNo }}</text>
  19. </view>
  20. <view class="time">提现申请时间:{{ item.takeTime }}</view>
  21. </view>
  22. </view>
  23. <view class="right-section">
  24. <view class="amount-info">
  25. <text class="amount-label">实发金额</text>
  26. <text class="amount-value">¥{{ item.receiveAmount }}</text>
  27. </view>
  28. <view class="amount-info">
  29. <text class="amount-label">应发金额</text>
  30. <text class="amount-value">¥{{ item.shoudAmount }}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="bottom-section">
  35. <text class="detail-link" @click="goToDetail(item)">进入详情</text>
  36. </view>
  37. </view>
  38. </up-list-item>
  39. </up-list>
  40. </view>
  41. </view>
  42. </template>
  43. <script setup>
  44. import { ref, reactive, onMounted } from 'vue'
  45. import { onLoad, onShow } from '@dcloudio/uni-app'
  46. import { getWithdrawStatus, volEetCancelTake } from '@/api/mine'
  47. const listData = ref([])
  48. const getDetails = async () => {
  49. try {
  50. const res = await getWithdrawStatus()
  51. console.log('提现列表数据:', res)
  52. if (res.code == 200) {
  53. listData.value = res.rows || []
  54. } else {
  55. uni.showToast({
  56. title: res.msg || '获取数据失败',
  57. icon: 'none'
  58. })
  59. }
  60. } catch (error) {
  61. console.error('获取提现列表失败:', error)
  62. uni.showToast({
  63. title: '获取数据失败',
  64. icon: 'none'
  65. })
  66. }
  67. }
  68. const goToDetail = (item) => {
  69. // 跳转到详情页,传递完整的数据
  70. uni.navigateTo({
  71. url: `/pages_mine/pages/withdrawal/details?data=${encodeURIComponent(JSON.stringify(item))}`
  72. })
  73. }
  74. onMounted(() => {
  75. getDetails()
  76. })
  77. </script>
  78. <style lang="scss" scoped>
  79. .withdrawal-item {
  80. padding: 20rpx;
  81. background-color: #fff;
  82. border-radius: 12rpx;
  83. margin: 20rpx;
  84. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  85. }
  86. .main-info {
  87. display: flex;
  88. justify-content: space-between;
  89. margin-bottom: 20rpx;
  90. }
  91. .left-section {
  92. display: flex;
  93. flex: 1;
  94. gap: 20rpx;
  95. }
  96. .info-content {
  97. display: flex;
  98. flex-direction: column;
  99. gap: 10rpx;
  100. }
  101. .name-account {
  102. display: flex;
  103. flex-direction: column;
  104. gap: 8rpx;
  105. }
  106. .name {
  107. font-size: 28rpx;
  108. color: #333;
  109. font-weight: 500;
  110. }
  111. .account {
  112. font-size: 24rpx;
  113. color: #666;
  114. }
  115. .time {
  116. font-size: 24rpx;
  117. color: #999;
  118. }
  119. .right-section {
  120. display: flex;
  121. flex-direction: column;
  122. align-items: flex-end;
  123. gap: 10rpx;
  124. }
  125. .amount-info {
  126. display: flex;
  127. flex-direction: column;
  128. align-items: flex-end;
  129. }
  130. .amount-label {
  131. font-size: 24rpx;
  132. color: #999;
  133. }
  134. .amount-value {
  135. font-size: 32rpx;
  136. color: #333;
  137. font-weight: 500;
  138. }
  139. .bottom-section {
  140. display: flex;
  141. justify-content: flex-end;
  142. border-top: 1rpx solid #f5f5f5;
  143. padding-top: 20rpx;
  144. }
  145. .detail-link {
  146. color: #2979ff;
  147. font-size: 28rpx;
  148. padding: 10rpx 20rpx;
  149. }
  150. </style>