tblist.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="content">
  3. <view class="ss-box flex">
  4. <view class="ss-main">
  5. <view class="ss-main-icon"><image src="../../static/img/ss.png" mode=""></image></view>
  6. <input type="text" @blur="loadData()" v-model="keyworld" placeholder="搜索您需要的幣種" />
  7. </view>
  8. <view class="ss-font" @click="navTo('/pages/user/user')">取消</view>
  9. </view>
  10. <view class="title">可提幣列表</view>
  11. <scroll-view class="swiper-box" scroll-y="true" :style="{ height: maxheight }">
  12. <view class="list" v-for="(item, index) in bilist" @click="nav(item)">
  13. <view class="list-item flex">
  14. <view class="list-item-left">
  15. <view class="list-title">{{ item.cname }}</view>
  16. <view class="list-tip">{{ item.title }}</view>
  17. </view>
  18. <view class="list-item-right">
  19. <view class="kc">{{ item.cnum }}</view>
  20. <view class="back"><image src="../../static/icon/user-back.png" mode=""></image></view>
  21. </view>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. </template>
  27. <script>
  28. import { txcoin } from '@/api/wallet.js';
  29. export default {
  30. data() {
  31. return {
  32. keyworld: '',
  33. rmlist: ['USDT', 'BTC', 'ETH', 'TRX'],
  34. bilist: [],
  35. maxheight: ''
  36. };
  37. },
  38. onLoad() {},
  39. onShow() {
  40. this.loadData();
  41. },
  42. onReachBottom() {},
  43. onReady(res) {
  44. var _this = this;
  45. uni.getSystemInfo({
  46. success: resu => {
  47. const query = uni.createSelectorQuery();
  48. query.select('.swiper-box').boundingClientRect();
  49. query.exec(function(res) {
  50. _this.maxheight = resu.windowHeight - res[0].top + 'px';
  51. console.log('打印页面的剩余高度', _this.maxheight);
  52. });
  53. },
  54. fail: res => {}
  55. });
  56. },
  57. methods: {
  58. loadData() {
  59. txcoin({ name: this.keyworld }).then(e => {
  60. this.bilist = e.data;
  61. });
  62. },
  63. navTo(url) {
  64. uni.navigateTo({
  65. url,
  66. fail() {
  67. uni.switchTab({
  68. url
  69. });
  70. }
  71. });
  72. },
  73. nav(opt) {
  74. uni.navigateTo({
  75. url: '/pages/transaction/tbdetail?type=' + opt.id
  76. });
  77. }
  78. }
  79. };
  80. </script>
  81. <style lang="scss">
  82. page,
  83. .content {
  84. min-height: 100%;
  85. height: auto;
  86. background: #ffffff;
  87. }
  88. .ss-box {
  89. padding: 12rpx 62rpx 10rpx 34rpx;
  90. border-bottom: 1px solid #f6f6f6;
  91. .ss-main {
  92. width: 537rpx;
  93. padding: 10rpx 0;
  94. background: #f6f6f6;
  95. border-radius: 26rpx;
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. .ss-main-icon {
  100. width: 32rpx;
  101. height: 32rpx;
  102. margin-right: 20rpx;
  103. image {
  104. width: 100%;
  105. height: 100%;
  106. }
  107. }
  108. input {
  109. font-size: 20rpx;
  110. font-family: PingFang SC;
  111. font-weight: 500;
  112. color: #aaaaaa;
  113. }
  114. }
  115. .ss-font {
  116. font-size: 28rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. color: #070707;
  120. }
  121. }
  122. .title {
  123. display: inline-block;
  124. margin: 30rpx 0 0 18rpx;
  125. padding: 0 10rpx 13rpx;
  126. border-bottom: 4rpx solid #f4d03c;
  127. }
  128. .rmbz {
  129. padding: 32rpx 0;
  130. justify-content: center;
  131. .rmbz-item {
  132. width: 130rpx;
  133. height: 52rpx;
  134. border: 2rpx solid #848a8f;
  135. border-radius: 10rpx;
  136. text-align: center;
  137. line-height: 52rpx;
  138. font-size: 24rpx;
  139. font-family: PingFang SC;
  140. font-weight: 500;
  141. color: #000000;
  142. margin: 0 16rpx;
  143. }
  144. }
  145. .list {
  146. margin-top: 6rpx;
  147. padding: 0 24rpx;
  148. .list-item {
  149. padding: 42rpx 0 24rpx;
  150. .list-item-left {
  151. display: flex;
  152. align-items: center;
  153. .list-title {
  154. width: 200rpx;
  155. font-size: 28rpx;
  156. font-family: PingFang SC;
  157. font-weight: 500;
  158. color: #5d5f70;
  159. }
  160. .list-tip {
  161. font-size: 24rpx;
  162. font-family: PingFang SC;
  163. font-weight: 500;
  164. color: #5d5f70;
  165. }
  166. }
  167. .list-item-right {
  168. display: flex;
  169. align-items: center;
  170. line-height: 1;
  171. .kc {
  172. font-size: 20rpx;
  173. font-family: PingFang SC;
  174. font-weight: 500;
  175. color: #5d5f70;
  176. margin-right: 20rpx;
  177. }
  178. .back {
  179. width: 24rpx;
  180. height: 24rpx;
  181. image {
  182. width: 100%;
  183. height: 100%;
  184. }
  185. }
  186. }
  187. }
  188. }
  189. </style>