rg.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view class="content">
  3. <view class="vheight"></view>
  4. <view class="top1 flex">
  5. <image @click="back()" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
  6. <image @click="navTo('/pages/user/myrg')" class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
  7. </view>
  8. <view class="top"><image :src="'' + banner" mode=""></image></view>
  9. <view class="main" v-for="(item, index) in list" @click="navTo('/pages/index/rgDetail?id=' + item.id)">
  10. <view class="main-top flex">
  11. <view class="main-icon"><image :src="item.imgs" mode=""></image></view>
  12. <view class="main-top-info">
  13. <view class="main-title clamp">{{ item.name }}</view>
  14. <view class="main-btype">{{ $t('rg.rgbz') }}:{{ item.coinname.toLocaleUpperCase() }}</view>
  15. <view class="main-time">{{ $t('rg.kssj') }}:{{ item.starttime }}</view>
  16. <view class="main-time">{{ $t('rg.jssj') }}:{{ item.finishtime }}</view>
  17. </view>
  18. </view>
  19. <view class="xian"><u-line-progress active-color="#2979ff" :percent="((item.num * 1 - item.sellnum * 1) / (item.num * 1)) * 100"></u-line-progress></view>
  20. <view class="main-bottom flex">
  21. <view class="main-bottom-item first">
  22. <view class="main-bottom-item-font">{{ $t('rg.fxzl') }}</view>
  23. <view class="main-bottom-item-num">{{ item.num }}</view>
  24. </view>
  25. <view class="main-bottom-item">
  26. <view class="main-bottom-item-font">{{ $t('rg.rgdj') }}</view>
  27. <view class="main-bottom-item-num">{{ item.price }} {{ item.buycoin.toLocaleUpperCase() }}</view>
  28. </view>
  29. <view class="main-bottom-item">
  30. <view class="main-bottom-item-font">{{ $t('rg.scsj') }}</view>
  31. <view class="main-bottom-item-num">{{ item.lockday }}{{ $t('rg.t') }}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import { index } from '@/api/wallet.js';
  39. export default {
  40. data() {
  41. return {
  42. list: [],
  43. banner: ''
  44. };
  45. },
  46. onLoad() {},
  47. onShow() {
  48. this.loadData();
  49. },
  50. methods: {
  51. back() {
  52. uni.navigateBack();
  53. },
  54. loadData() {
  55. index({ page: 1, limit: 1000 }).then(({ data }) => {
  56. this.list = data.list;
  57. this.banner = data.webissue;
  58. });
  59. },
  60. navTo(url) {
  61. uni.navigateTo({
  62. url
  63. });
  64. }
  65. }
  66. };
  67. </script>
  68. <style lang="scss">
  69. .vheight {
  70. height: var(--status-bar-height);
  71. }
  72. .top1 {
  73. padding: 20rpx 40rpx;
  74. .top-icon1 {
  75. width: 52rpx;
  76. height: 36rpx;
  77. }
  78. .top-icon2 {
  79. width: 48rpx;
  80. height: 48rpx;
  81. }
  82. }
  83. .top {
  84. margin: auto;
  85. width: 750rpx;
  86. height: 300rpx;
  87. image {
  88. width: 100%;
  89. height: 100%;
  90. }
  91. }
  92. .main {
  93. background: #fff;
  94. margin-top: 20rpx;
  95. padding: 16rpx 20rpx 24rpx;
  96. .main-top {
  97. justify-content: flex-start;
  98. align-items: center;
  99. .main-icon {
  100. width: 250rpx;
  101. height: 250rpx;
  102. image {
  103. width: 100%;
  104. height: 100%;
  105. }
  106. }
  107. .main-top-info {
  108. margin-left: 10rpx;
  109. .main-title {
  110. font-size: 32rpx;
  111. font-weight: bold;
  112. color: #707a8a;
  113. }
  114. .main-btype {
  115. margin-top: 6rpx;
  116. font-size: 28rpx;
  117. color: #707a8a;
  118. }
  119. .main-time {
  120. margin-top: 6rpx;
  121. font-size: 28rpx;
  122. color: #707a8a;
  123. }
  124. }
  125. }
  126. .xian {
  127. margin-top: 20rpx;
  128. }
  129. .main-bottom {
  130. padding: 28rpx 16rpx;
  131. .first {
  132. align-items: flex-start !important;
  133. }
  134. .main-bottom-item {
  135. display: flex;
  136. flex-direction: column;
  137. align-items: center;
  138. .main-bottom-item-font {
  139. font-size: 28rpx;
  140. color: #707a8a;
  141. }
  142. .main-bottom-item-num {
  143. margin-top: 10rpx;
  144. font-size: 28rpx;
  145. color: #707a8a;
  146. }
  147. }
  148. }
  149. }
  150. </style>