tblist.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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="$t('cb.ssnxydbz')" />
  7. </view>
  8. <view class="ss-font" @click="navTo('/pages/user/user')">{{ $t('cb.qx') }}</view>
  9. </view>
  10. <view class="title">{{ $t('tb.ktblb') }}</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. uni.setNavigationBarTitle({ title: this.$t('tb.tblb') });
  40. },
  41. onShow() {
  42. this.loadData();
  43. },
  44. onReachBottom() {},
  45. onReady(res) {
  46. var _this = this;
  47. uni.getSystemInfo({
  48. success: resu => {
  49. const query = uni.createSelectorQuery();
  50. query.select('.swiper-box').boundingClientRect();
  51. query.exec(function(res) {
  52. _this.maxheight = resu.windowHeight - res[0].top + 'px';
  53. console.log('打印页面的剩余高度', _this.maxheight);
  54. });
  55. },
  56. fail: res => {}
  57. });
  58. },
  59. methods: {
  60. loadData() {
  61. txcoin({ name: this.keyworld }).then(e => {
  62. this.bilist = e.data;
  63. });
  64. },
  65. navTo(url) {
  66. uni.navigateTo({
  67. url,
  68. fail() {
  69. uni.switchTab({
  70. url
  71. });
  72. }
  73. });
  74. },
  75. nav(opt) {
  76. uni.navigateTo({
  77. url: '/pages/transaction/tbdetail?type=' + opt.id
  78. });
  79. }
  80. }
  81. };
  82. </script>
  83. <style lang="scss">
  84. page,
  85. .content {
  86. min-height: 100%;
  87. height: auto;
  88. background: #ffffff;
  89. }
  90. .ss-box {
  91. padding: 12rpx 62rpx 10rpx 34rpx;
  92. border-bottom: 1px solid #f6f6f6;
  93. .ss-main {
  94. width: 537rpx;
  95. padding: 10rpx 0;
  96. background: #f6f6f6;
  97. border-radius: 26rpx;
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. .ss-main-icon {
  102. width: 32rpx;
  103. height: 32rpx;
  104. margin-right: 20rpx;
  105. image {
  106. width: 100%;
  107. height: 100%;
  108. }
  109. }
  110. input {
  111. font-size: 20rpx;
  112. font-family: PingFang SC;
  113. font-weight: 500;
  114. color: #aaaaaa;
  115. }
  116. }
  117. .ss-font {
  118. font-size: 28rpx;
  119. font-family: PingFang SC;
  120. font-weight: 500;
  121. color: #070707;
  122. }
  123. }
  124. .title {
  125. display: inline-block;
  126. margin: 30rpx 0 0 18rpx;
  127. padding: 0 10rpx 13rpx;
  128. border-bottom: 4rpx solid #f4d03c;
  129. }
  130. .rmbz {
  131. padding: 32rpx 0;
  132. justify-content: center;
  133. .rmbz-item {
  134. width: 130rpx;
  135. height: 52rpx;
  136. border: 2rpx solid #848a8f;
  137. border-radius: 10rpx;
  138. text-align: center;
  139. line-height: 52rpx;
  140. font-size: 24rpx;
  141. font-family: PingFang SC;
  142. font-weight: 500;
  143. color: #000000;
  144. margin: 0 16rpx;
  145. }
  146. }
  147. .list {
  148. margin-top: 6rpx;
  149. padding: 0 24rpx;
  150. .list-item {
  151. padding: 42rpx 0 24rpx;
  152. .list-item-left {
  153. display: flex;
  154. align-items: center;
  155. .list-title {
  156. width: 200rpx;
  157. font-size: 28rpx;
  158. font-family: PingFang SC;
  159. font-weight: 500;
  160. color: #5d5f70;
  161. }
  162. .list-tip {
  163. font-size: 24rpx;
  164. font-family: PingFang SC;
  165. font-weight: 500;
  166. color: #5d5f70;
  167. }
  168. }
  169. .list-item-right {
  170. display: flex;
  171. align-items: center;
  172. line-height: 1;
  173. .kc {
  174. font-size: 20rpx;
  175. font-family: PingFang SC;
  176. font-weight: 500;
  177. color: #5d5f70;
  178. margin-right: 20rpx;
  179. }
  180. .back {
  181. width: 24rpx;
  182. height: 24rpx;
  183. image {
  184. width: 100%;
  185. height: 100%;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. </style>