historyRecord.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="historyList">
  3. <view class="historyListItem" v-for="(item, index) in dataList" :key="item.rechargeOrderSn">
  4. <image class="itemImages" src="@/static/images/user/chon.png"></image>
  5. <view class="texts">
  6. <text class="names">余额充值</text>
  7. <text class="timers">{{ item.createTime }}</text>
  8. </view>
  9. <view class="addNumber">
  10. + {{ item.rechargeBalance * 2 }} 元
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import { getByRechargeApi } from '@/api/anotherTFInterface'
  17. export default {
  18. name: 'historyRecord',
  19. data() {
  20. return {
  21. dataList: []
  22. }
  23. },
  24. created() {
  25. getByRechargeApi({
  26. page: 1,
  27. pageSize: 100
  28. }).then(res => [
  29. this.dataList = res.data.records
  30. ])
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .historyListItem {
  36. margin: 6rpx 0;
  37. position: relative;
  38. box-sizing: border-box;
  39. padding: 16rpx 32rpx;
  40. width: 100%;
  41. display: flex;
  42. align-items: center;
  43. .itemImages {
  44. width: 80rpx;
  45. height: 80rpx;
  46. border-radius: 50%;
  47. }
  48. .texts {
  49. margin-left: 20rpx;
  50. display: flex;
  51. flex-direction: column;
  52. /* justify-content: space-between; */
  53. /* gap: 10rpx; */
  54. .names {
  55. font-family: Source Han Sans;
  56. font-size: 34rpx;
  57. font-weight: 600;
  58. line-height: 40rpx;
  59. color: #222229;
  60. }
  61. .timers {
  62. margin-top: 8rpx;
  63. font-family: Source Han Sans;
  64. font-size: 30rpx;
  65. font-weight: normal;
  66. line-height: 32rpx;
  67. color: #888889;
  68. }
  69. }
  70. .addNumber {
  71. position: absolute;
  72. right: 20rpx;
  73. font-family: Source Han Sans;
  74. font-size: 40rpx;
  75. font-weight: 500;
  76. line-height: 40rpx;
  77. color: #222229;
  78. }
  79. }
  80. </style>