coininfo.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="content">
  3. <view class="top-base">
  4. <view class="contentbox_top">{{ info.name }}</view>
  5. <view class="base-info flex">
  6. <view class="info-item">
  7. <view class="item-name">{{ $t('user.ky') }}</view>
  8. <view class="item-val">{{ info.num }}</view>
  9. </view>
  10. <view class="info-item">
  11. <view class="item-name">{{ $t('user.dj') }}</view>
  12. <view class="item-val">{{ info.numd }}</view>
  13. </view>
  14. <view class="info-item">
  15. <view class="item-name" style="text-align: right;">{{ $t('user.zh') }}(USDT)</view>
  16. <view class="item-val" style="text-align: right;">{{ info.zhe }}</view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="" style="height: 20rpx;background-color: #f5f5f5;"></view>
  21. <view class="tit">{{ $t('user.cwjl') }}</view>
  22. <view class="cwjl-wrap" v-for="item in list">
  23. <view class="jl-tit">{{ item.remark }}</view>
  24. <view class="jl-info flex">
  25. <view class="info-item">
  26. <view class="item-name">{{ $t('user.sl') }}</view>
  27. <view class="item-val">{{ item.num }}</view>
  28. </view>
  29. <view class="info-item">
  30. <view class="item-name">{{ $t('user.zt') }}</view>
  31. <view class="item-val">{{ item.st == 1 ? $t('user.zj') : item.st == 2 ? $t('user.js') : '' }}</view>
  32. </view>
  33. <view class="info-item">
  34. <view class="item-name" style="text-align: right;">{{ $t('user.sj') }}</view>
  35. <view class="item-val" style="text-align: right;">{{ item.addtime }}</view>
  36. </view>
  37. </view>
  38. </view>
  39. <uni-load-more :status="loadingType"></uni-load-more>
  40. <view class="tianc" style="height: 120rpx;background-color: #fff;"></view>
  41. <view class="btm-btn flex" v-if="info.czstatus == 1 || info.txstatus == 1 || id == 4">
  42. <view class="btnbox_a " v-if="info.czstatus == 1" @click="navto('/pages/transaction/cbdetail?type=' + id)">{{ $t('user.cb') }}</view>
  43. <view class="btnbox_b " v-if="info.txstatus == 1" @click="navto('/pages/transaction/tbdetail?type=' + id)">{{ $t('user.tb') }}</view>
  44. <view class="btnbox_b " v-if="id == 4" @click="navto('/pages/transaction/transfer')">{{ $t('user.hz') }}</view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import { coininfo, bill } from '@/api/login.js';
  50. export default {
  51. data() {
  52. return {
  53. id: '',
  54. info: {},
  55. page: 1,
  56. limit: 10,
  57. loadingType: 'more',
  58. loaded: false,
  59. list: []
  60. };
  61. },
  62. onLoad(opt) {
  63. if (opt.id) {
  64. this.id = opt.id;
  65. this.coininfo();
  66. }
  67. },
  68. onShow() {},
  69. onReachBottom() {
  70. console.log('dao');
  71. this.bill();
  72. },
  73. onReady() {},
  74. methods: {
  75. navto(url) {
  76. uni.navigateTo({
  77. url
  78. });
  79. },
  80. coininfo() {
  81. let obj = this;
  82. coininfo({
  83. cid: obj.id
  84. }).then(res => {
  85. console.log(res);
  86. obj.info = res.data;
  87. obj.bill();
  88. });
  89. },
  90. bill() {
  91. let obj = this;
  92. if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
  93. return;
  94. }
  95. obj.loadingType = 'loading';
  96. bill({
  97. name: obj.info.name,
  98. page: obj.page,
  99. limit: obj.limit
  100. }).then(res => {
  101. console.log(res);
  102. // if()
  103. obj.list = obj.list.concat(res.data);
  104. obj.page++
  105. if (obj.limit == res.data.length) {
  106. obj.loadingType = 'more';
  107. } else {
  108. obj.loadingType = 'noMore';
  109. }
  110. obj.loaded = true;
  111. });
  112. }
  113. }
  114. };
  115. </script>
  116. <style lang="scss">
  117. page {
  118. background-color: #fff;
  119. height: 100%;
  120. }
  121. .top-base {
  122. width: 750rpx;
  123. height: 240rpx;
  124. background-color: #fff;
  125. padding: 10rpx 30rpx;
  126. }
  127. .contentbox_top {
  128. color: #fcd535;
  129. height: 100rpx;
  130. line-height: 100rpx;
  131. font-size: 52rpx;
  132. }
  133. .base-info {
  134. width: 100%;
  135. justify-content: space-between;
  136. .info-item {
  137. width: 33%;
  138. height: 100rpx;
  139. color: #000;
  140. font-size: 28rpx;
  141. .item-name {
  142. color: #707a8a;
  143. }
  144. }
  145. }
  146. .tit {
  147. height: 100rpx;
  148. line-height: 100rpx;
  149. padding: 20rpx;
  150. color: #000;
  151. font-size: 40rpx;
  152. }
  153. .cwjl-wrap {
  154. width: 660rpx;
  155. // height: 180rpx;
  156. border-bottom: 1px solid #f5f5f5;
  157. margin: auto;
  158. padding: 10rpx 20rpx;
  159. color: #000;
  160. font-size: 28rpx;
  161. .jl-tit {
  162. }
  163. .jl-info {
  164. justify-content: space-between;
  165. align-items: flex-start;
  166. .info-item {
  167. width: 33%;
  168. .item-name {
  169. color: #707a8a;
  170. padding: 20rpx 0 10rpx;
  171. }
  172. .item-val {
  173. padding: 10rpx 0;
  174. }
  175. }
  176. }
  177. }
  178. .btm-btn {
  179. width: 750rpx;
  180. height: 120rpx;
  181. padding: 20rpx;
  182. font-size: 28rpx;
  183. color: #000;
  184. justify-content: flex-start;
  185. position: fixed;
  186. bottom: 0;
  187. background-color: #fff;
  188. .btnbox_a {
  189. width: 198rpx;
  190. height: 80rpx;
  191. line-height: 80rpx;
  192. text-align: center;
  193. background: linear-gradient(to left, #eeb80d, #ffe35b);
  194. margin-right: 20rpx;
  195. border-radius: 20rpx;
  196. }
  197. .btnbox_b {
  198. width: 198rpx;
  199. height: 80rpx;
  200. line-height: 80rpx;
  201. text-align: center;
  202. background: #f5f5f5;
  203. margin-right: 20rpx;
  204. border-radius: 20rpx;
  205. }
  206. }
  207. </style>