contract-list.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view class="earning-box">
  3. <en-list ref="earningObj" @getList="getList">
  4. <template v-slot:listInfo="{pagingData}">
  5. <view class="earning-list">
  6. <view v-for="item in pagingData" class="item">
  7. <view class="list-item">
  8. <view class="item-line">
  9. <view class="item-text">BNB</view>
  10. </view>
  11. <view class="item-line line-text">
  12. <view class="item-text">{{$t('index.index.list.item.title')}}</view>
  13. </view>
  14. <view class="item-line" v-if="item.hash">
  15. <view class="item-text">Hash</view>
  16. <view class="item-text text-hash">
  17. {{item.hash}}
  18. </view>
  19. </view>
  20. <view class="item-line">
  21. <view class="item-text">BNB Number</view>
  22. <view class="item-text text-two">
  23. <view class="text-img">
  24. <image src="@/static/img/index/bnb2.png"></image>
  25. </view>
  26. <view class="text">{{(item.money).toFixed(6)}}</view>
  27. </view>
  28. </view>
  29. <view class="item-line" >
  30. <view class="item-text">{{$t('index.index.list.item.status')}}</view>
  31. <view class="item-text text-two">
  32. <view class="status-img ">
  33. <image v-if="item.status===1" src="@/static/img/contract/send.png"></image>
  34. <image v-else-if="item.status===2" src="@/static/img/contract/ok.png"></image>
  35. <image v-else-if="item.status===3" src="@/static/img/contract/no.png"></image>
  36. <image v-else src="@/static/img/contract/end.png"></image>
  37. </view>
  38. <view class="text">{{item.statusName}}</view>
  39. </view>
  40. </view>
  41. <view class="item-line">
  42. <view class="item-text">{{$t('index.index.list.item.date')}}</view>
  43. <view class="item-text">{{item.created_at}}</view>
  44. </view>
  45. </view>
  46. <division class="division-item"></division>
  47. </view>
  48. </view>
  49. </template>
  50. </en-list>
  51. </view>
  52. </template>
  53. <script>
  54. import EnList from "@/components/en-list/en-list";
  55. import {getContractList, getEarnings} from "@/api/contract";
  56. import Division from "@/pages/index/components/division";
  57. export default {
  58. name: "contract-list",
  59. components: {Division, EnList},
  60. props: {},
  61. data() {
  62. return {}
  63. },
  64. watch: {},
  65. mounted() {
  66. },
  67. methods: {
  68. getList(page) {
  69. getContractList({'page': page}).then((res) => {
  70. if (res.code === 1) {
  71. this.$refs.earningObj.setList(res.data.items, res.data.total)
  72. }
  73. })
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .earning-box {
  80. .earning-list {
  81. .list-item {
  82. margin-top: 20rpx;
  83. .item-line {
  84. margin-bottom: 20rpx;
  85. display: flex;
  86. justify-content: space-between;
  87. .item-text {
  88. font-size: 26rpx;
  89. color: rgb(177, 177, 177);
  90. line-height: 42rpx;
  91. height: 42rpx;
  92. }
  93. .text-hash{
  94. max-width: 200rpx;
  95. overflow-x:hidden;
  96. text-overflow: ellipsis;
  97. }
  98. .text-two {
  99. display: flex;
  100. justify-content: right;
  101. .text-img {
  102. display: inline-block;
  103. padding: 6rpx;
  104. background: rgb(0, 87, 255);
  105. border-radius: 50%;
  106. height: 42rpx;
  107. width: 42rpx;
  108. box-sizing: border-box;
  109. margin-right: 10rpx;
  110. image {
  111. width: 30rpx;
  112. height: 30rpx;
  113. z-index: 100;
  114. }
  115. }
  116. .status-img{
  117. display: inline-block;
  118. border-radius: 50%;
  119. height: 42rpx;
  120. width: 42rpx;
  121. box-sizing: border-box;
  122. margin-right: 5rpx;
  123. image {
  124. width: 42rpx;
  125. height: 42rpx;
  126. z-index: 100;
  127. }
  128. }
  129. .text {
  130. font-size: 30rpx;
  131. }
  132. }
  133. }
  134. .line-text {
  135. margin-bottom: 40rpx;
  136. .item-text {
  137. font-weight: bold;
  138. font-size: 26rpx;
  139. color: #222;
  140. }
  141. }
  142. }
  143. .item:last-child {
  144. .division-item {
  145. display: none;
  146. }
  147. }
  148. }
  149. }
  150. </style>