detail.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view class="recharge-details">
  3. <u-divider text="服务点充值信息"></u-divider>
  4. <view class="content">
  5. <view class="card">
  6. <view class="card-item">
  7. <text class="label">充值时间</text>
  8. <text class="value">{{ detail.topupTime }}</text>
  9. </view>
  10. <view class="card-item highlight">
  11. <text class="label">充值点数</text>
  12. <text class="value">{{ detail.amount }}</text>
  13. </view>
  14. <view class="card-item">
  15. <text class="label">充值前点数</text>
  16. <text class="value">{{ detail.beforeAmount }}</text>
  17. </view>
  18. <view class="card-item">
  19. <text class="label">充值后点数</text>
  20. <text class="value">{{ detail.afterAmount }}</text>
  21. </view>
  22. </view>
  23. <view class="card">
  24. <view class="card-item">
  25. <text class="label">微信订单号</text>
  26. <text class="value">{{ detail.transactionId }}</text>
  27. </view>
  28. <view class="card-item">
  29. <text class="label">系统订单号</text>
  30. <text class="value">{{ detail.outTradeNo }}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="footer">
  35. <button class="return-button" @tap="goBack">返回</button>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. detail: {
  44. },
  45. rechargeTime: '2024-10-28 17:18:58',
  46. beforePoints: 100,
  47. afterPoints: 200,
  48. rechargePoints: 100,
  49. wxOrderNo: 'WX20241028171858001',
  50. systemOrderNo: 'SYS20241028171858001'
  51. }
  52. },
  53. onLoad(option) {
  54. // 从路由参数中获取充值金额
  55. this.geDetail(option.id);
  56. },
  57. methods: {
  58. geDetail(id) {
  59. this.http.request({
  60. url: '/level-one-server/app/TbWalletTopup/getById',
  61. data: {
  62. id: id
  63. },
  64. success: resp => {
  65. this.detail = resp.data.data;
  66. }
  67. })
  68. },
  69. goBack() {
  70. uni.navigateBack()
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="scss">
  76. .recharge-details {
  77. min-height: 80vh;
  78. background-color: #f5f7fa;
  79. display: flex;
  80. flex-direction: column;
  81. }
  82. .header {
  83. background-color: #007AFF;
  84. padding: 40rpx 30rpx;
  85. display: flex;
  86. align-items: center;
  87. position: relative;
  88. .back-button {
  89. position: absolute;
  90. left: 30rpx;
  91. .icon-back {
  92. font-size: 40rpx;
  93. color: #ffffff;
  94. }
  95. }
  96. .title {
  97. flex: 1;
  98. text-align: center;
  99. color: #ffffff;
  100. font-size: 36rpx;
  101. font-weight: bold;
  102. }
  103. }
  104. .content {
  105. flex: 1;
  106. padding: 30rpx;
  107. }
  108. .card {
  109. background-color: #ffffff;
  110. border-radius: 20rpx;
  111. padding: 30rpx;
  112. margin-bottom: 30rpx;
  113. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
  114. }
  115. .card-item {
  116. display: flex;
  117. justify-content: space-between;
  118. align-items: center;
  119. padding: 20rpx 0;
  120. border-bottom: 1rpx solid #f0f0f0;
  121. &:last-child {
  122. border-bottom: none;
  123. }
  124. .label {
  125. color: #666666;
  126. font-size: 28rpx;
  127. }
  128. .value {
  129. color: #333333;
  130. font-size: 28rpx;
  131. font-weight: 500;
  132. }
  133. &.highlight {
  134. .label,
  135. .value {
  136. color: #007AFF;
  137. font-weight: bold;
  138. }
  139. }
  140. }
  141. .footer {
  142. padding: 30rpx;
  143. }
  144. .return-button {
  145. background-color: #007AFF;
  146. color: #ffffff;
  147. border: none;
  148. border-radius: 50rpx;
  149. padding: 20rpx 0;
  150. font-size: 32rpx;
  151. font-weight: bold;
  152. box-shadow: 0 4rpx 12rpx rgba(0, 123, 255, 0.3);
  153. transition: all 0.3s ease;
  154. &:active {
  155. transform: translateY(2rpx);
  156. box-shadow: 0 2rpx 6rpx rgba(0, 123, 255, 0.3);
  157. }
  158. }
  159. // 添加一个简单的图标字体,用于返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vQcY6YZk0o6lZRTq5kRAAA=') format('woff2');
  163. }
  164. .iconfont {
  165. font-family: "iconfont" !important;
  166. font-style: normal;
  167. -webkit-font-smoothing: antialiased;
  168. -moz-osx-font-smoothing: grayscale;
  169. }
  170. .icon-back:before {
  171. content: "\e697";
  172. }
  173. </style>