cbRecord.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="content">
  3. <view class="main">
  4. <view class="main-title">
  5. <view class="main-title-item">{{ $t('cb.bz') }}</view>
  6. <view class="main-title-item">{{ $t('cb.sj') }}</view>
  7. </view>
  8. <view class="main-info" v-for="(item, index) in list" @click="navTo('/pages/user/cbDetail?id=' + item.id)">
  9. <view class="main-info-top flex">
  10. <view class="main-info-title">{{ item.coin }}</view>
  11. <view class="main-info-type">{{ item.status == 1 ? $t('cb.dsh') : item.status == 2 ? $t('cb.wc') : $t('cb.sb') }}</view>
  12. </view>
  13. <view class="main-info-bottom flex">
  14. <view class="main-bottom-item left">
  15. <view class="main-bottom-item-font">{{ $t('cb.sl') }}</view>
  16. <view class="main-bottom-item-num">{{ item.num }}</view>
  17. </view>
  18. <view class="main-bottom-item center">
  19. <view class="main-bottom-item-font">{{ $t('cb.sxf') }}</view>
  20. <view class="main-bottom-item-num">0.0000</view>
  21. </view>
  22. <view class="main-bottom-item right">
  23. <view class="main-bottom-item-font">{{ $t('cb.sj') }}</view>
  24. <view class="main-bottom-item-num">{{ item.addtime }}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { czlist } from '@/api/wallet.js';
  33. export default {
  34. data() {
  35. return {
  36. list: []
  37. };
  38. },
  39. onLoad() {
  40. uni.setNavigationBarTitle({ title: this.$t('cb.cblb') });
  41. },
  42. onShow() {
  43. this.loadData();
  44. },
  45. methods: {
  46. loadData() {
  47. czlist({ page: 1, limit: 1000 }).then(e => {
  48. this.list = e.data;
  49. });
  50. },
  51. navTo(url) {
  52. uni.navigateTo({
  53. url
  54. });
  55. }
  56. }
  57. };
  58. </script>
  59. <style lang="scss">
  60. page,
  61. .content {
  62. min-height: 100%;
  63. height: auto;
  64. background: #f5f5f5;
  65. }
  66. .main {
  67. margin: 10rpx 0 0;
  68. background: #fff;
  69. padding: 20rpx;
  70. .main-title {
  71. display: flex;
  72. justify-content: space-around;
  73. align-items: center;
  74. padding: 20rpx 0;
  75. border-bottom: 1px solid #fcfcfc;
  76. }
  77. .main-info {
  78. padding: 20rpx 20rpx;
  79. border-bottom: 1px solid #fcfcfc;
  80. .main-info-top {
  81. .main-info-title {
  82. font-size: 36rpx;
  83. font-weight: 500;
  84. color: #707a8a;
  85. }
  86. .main-info-type {
  87. font-size: 28rpx;
  88. color: #707a8a;
  89. }
  90. }
  91. .main-info-bottom {
  92. margin: 20rpx 0 0;
  93. .left {
  94. text-align: left;
  95. }
  96. .center {
  97. text-align: center;
  98. }
  99. .right {
  100. text-align: right;
  101. }
  102. .main-bottom-item {
  103. width: 33%;
  104. .main-bottom-item-font {
  105. font-size: 28rpx;
  106. color: #cbcbcb;
  107. }
  108. .main-bottom-item-num {
  109. height: 80rpx;
  110. margin-top: 20rpx;
  111. font-size: 28rpx;
  112. color: #000;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. </style>