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. image {
  110. width: 30rpx;
  111. height: 30rpx;
  112. z-index: 100;
  113. }
  114. }
  115. .status-img{
  116. display: inline-block;
  117. border-radius: 50%;
  118. height: 42rpx;
  119. width: 42rpx;
  120. box-sizing: border-box;
  121. image {
  122. width: 42rpx;
  123. height: 42rpx;
  124. z-index: 100;
  125. }
  126. }
  127. .text {
  128. margin-left: 10rpx;
  129. font-size: 30rpx;
  130. }
  131. }
  132. }
  133. .line-text {
  134. margin-bottom: 40rpx;
  135. .item-text {
  136. font-weight: bold;
  137. font-size: 26rpx;
  138. color: #222;
  139. }
  140. }
  141. }
  142. .item:last-child {
  143. .division-item {
  144. display: none;
  145. }
  146. }
  147. }
  148. }
  149. </style>