rgDetail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view class="content">
  3. <view class="main" v-if="info">
  4. <view class="main-top flex">
  5. <view class="main-icon"><image :src="info.imgs" mode=""></image></view>
  6. <view class="main-top-info">
  7. <view class="main-title clamp">{{ info.name }}</view>
  8. <view class="main-btype">認購幣種:{{ info.coinname.toLocaleUpperCase() }}</view>
  9. <view class="main-time">開始時間:{{ info.starttime }}</view>
  10. <view class="main-time">結束時間:{{ info.finishtime }}</view>
  11. </view>
  12. </view>
  13. <view class="xian"><u-line-progress active-color="#2979ff" :percent="((info.num * 1 - info.sellnum * 1) / (info.num * 1)) * 100"></u-line-progress></view>
  14. <view class="main-bottom flex">
  15. <view class="main-bottom-item first">
  16. <view class="main-bottom-item-font">發行總量</view>
  17. <view class="main-bottom-item-num">{{ info.num }}</view>
  18. </view>
  19. <view class="main-bottom-item">
  20. <view class="main-bottom-item-font">認購單價</view>
  21. <view class="main-bottom-item-num">{{ info.price }} {{ info.buycoin.toLocaleUpperCase() }}</view>
  22. </view>
  23. <view class="main-bottom-item">
  24. <view class="main-bottom-item-font">鎖倉時間</view>
  25. <view class="main-bottom-item-num">{{ info.lockday }}天</view>
  26. </view>
  27. </view>
  28. <view class="main-bottom flex">
  29. <view class="main-bottom-item first">
  30. <view class="main-bottom-item-font">參與數量</view>
  31. <view class="main-bottom-item-num">{{ info.sellnum }}</view>
  32. </view>
  33. <view class="main-bottom-item">
  34. <view class="main-bottom-item-font">認購上線</view>
  35. <view class="main-bottom-item-num">{{ info.allmax }}{{ info.buycoin.toLocaleUpperCase() }}</view>
  36. </view>
  37. <view class="main-bottom-item">
  38. <view class="main-bottom-item-font">單次最低</view>
  39. <view class="main-bottom-item-num">{{ info.min }}{{ info.buycoin.toLocaleUpperCase() }}</view>
  40. </view>
  41. </view>
  42. <view class="sr-input flex">
  43. <input placeholder="請輸入提幣數量" type="number" v-model="num" />
  44. <view class="main-type">{{ info.coinname.toLocaleUpperCase() }}</view>
  45. </view>
  46. <view class="sr-input flex">
  47. <view class="main-type">需要支付:{{ num != '' ? info.price * 1 * num : '0.00' }}</view>
  48. <view class="main-type">{{ info.buycoin.toLocaleUpperCase() }}</view>
  49. </view>
  50. <view class="font">可用{{ info.buycoin.toLocaleUpperCase() }}: {{ money }}</view>
  51. <view class="sr-btn" @click="submit()">立即參與</view>
  52. <view class="info">
  53. <view class="info-item">項目說明:{{ info.content }}</view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import { details } from '@/api/wallet.js';
  60. export default {
  61. data() {
  62. return {
  63. id: '',
  64. info: '',
  65. money: '',
  66. num: ''
  67. };
  68. },
  69. onLoad(opt) {
  70. this.id = opt.id;
  71. this.loadData();
  72. },
  73. onShow() {},
  74. methods: {
  75. loadData() {
  76. details({ id: this.id }).then(({ data }) => {
  77. this.info = data.info;
  78. this.money = data.money;
  79. });
  80. }
  81. }
  82. };
  83. </script>
  84. <style lang="scss">
  85. page,
  86. .content {
  87. min-height: 100%;
  88. height: auto;
  89. background: #fff;
  90. }
  91. .main {
  92. background: #fff;
  93. margin-top: 20rpx;
  94. padding: 16rpx 20rpx 24rpx;
  95. .main-top {
  96. justify-content: flex-start;
  97. align-items: center;
  98. .main-icon {
  99. width: 250rpx;
  100. height: 250rpx;
  101. image {
  102. width: 100%;
  103. height: 100%;
  104. }
  105. }
  106. .main-top-info {
  107. margin-left: 10rpx;
  108. .main-title {
  109. font-size: 32rpx;
  110. font-weight: bold;
  111. color: #707a8a;
  112. }
  113. .main-btype {
  114. margin-top: 6rpx;
  115. font-size: 28rpx;
  116. color: #707a8a;
  117. }
  118. .main-time {
  119. margin-top: 6rpx;
  120. font-size: 28rpx;
  121. color: #707a8a;
  122. }
  123. }
  124. }
  125. .xian {
  126. margin-top: 20rpx;
  127. }
  128. .main-bottom {
  129. padding: 28rpx 16rpx;
  130. .first {
  131. align-items: flex-start !important;
  132. }
  133. .main-bottom-item {
  134. display: flex;
  135. flex-direction: column;
  136. align-items: center;
  137. .main-bottom-item-font {
  138. font-size: 28rpx;
  139. color: #707a8a;
  140. }
  141. .main-bottom-item-num {
  142. margin-top: 10rpx;
  143. font-size: 28rpx;
  144. color: #707a8a;
  145. }
  146. }
  147. }
  148. .sr-input {
  149. margin-top: 20rpx;
  150. display: flex;
  151. align-items: center;
  152. width: 100%;
  153. height: 80rpx;
  154. line-height: 80rpx;
  155. background: #f5f5f5;
  156. border-radius: 20rpx;
  157. padding: 0rpx 30rpx;
  158. input {
  159. width: 292rpx;
  160. font-size: 28rpx;
  161. background: #f5f5f5;
  162. }
  163. .main-type {
  164. font-size: 28rpx;
  165. color: #707a8a;
  166. margin-right: 20rpx;
  167. }
  168. }
  169. .font {
  170. margin-top: 20rpx;
  171. padding-left: 30rpx;
  172. font-size: 28rpx;
  173. color: #707a8a;
  174. }
  175. .sr-btn {
  176. width: 100%;
  177. height: 80rpx;
  178. line-height: 80rpx;
  179. text-align: center;
  180. border-radius: 10rpx;
  181. margin: 40rpx auto 0;
  182. background: linear-gradient(to left, #eeb80d, #ffe35b);
  183. font-size: 28rpx;
  184. color: #000;
  185. }
  186. .info {
  187. margin: 40rpx auto 0;
  188. width: 690rpx;
  189. background: #ffffff;
  190. border-radius: 20rpx;
  191. padding: 30rpx 20rpx;
  192. .info-item {
  193. font-size: 28rpx;
  194. color: #000;
  195. margin-bottom: 20rpx;
  196. }
  197. }
  198. }
  199. </style>