coininfo.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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">可用</view>
  8. <view class="item-val">{{ info.num }}</view>
  9. </view>
  10. <view class="info-item">
  11. <view class="item-name">凍結</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;">折合(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">財務記錄</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">數量</view>
  27. <view class="item-val">{{ item.num }}</view>
  28. </view>
  29. <view class="info-item">
  30. <view class="item-name">狀態</view>
  31. <view class="item-val">{{ item.st == 1 ? '增加' : item.st == 2 ? '減少' : '' }}</view>
  32. </view>
  33. <view class="info-item">
  34. <view class="item-name" style="text-align: right;">時間</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">
  42. <view class="btnbox_a " v-if="info.czstatus == 1" @click="navto('/pages/transaction/cbdetail?type=' + id)">充幣</view>
  43. <view class="btnbox_b " v-if="info.txstatus == 1" @click="navto('/pages/transaction/tbdetail?type=' + id)">提幣</view>
  44. <view class="btnbox_b " v-if="id == 4" @click="navto('/pages/transaction/transfer')">劃轉</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. if (obj.limit == res.data.length) {
  105. obj.loadingType = 'more';
  106. } else {
  107. obj.loadingType = 'noMore';
  108. }
  109. obj.loaded = true;
  110. });
  111. }
  112. }
  113. };
  114. </script>
  115. <style lang="scss">
  116. page {
  117. background-color: #fff;
  118. height: 100%;
  119. }
  120. .top-base {
  121. width: 750rpx;
  122. height: 240rpx;
  123. background-color: #fff;
  124. padding: 10rpx 30rpx;
  125. }
  126. .contentbox_top {
  127. color: #fcd535;
  128. height: 100rpx;
  129. line-height: 100rpx;
  130. font-size: 52rpx;
  131. }
  132. .base-info {
  133. width: 100%;
  134. justify-content: space-between;
  135. .info-item {
  136. width: 33%;
  137. height: 100rpx;
  138. color: #000;
  139. font-size: 28rpx;
  140. .item-name {
  141. color: #707a8a;
  142. }
  143. }
  144. }
  145. .tit {
  146. height: 100rpx;
  147. line-height: 100rpx;
  148. padding: 20rpx;
  149. color: #000;
  150. font-size: 40rpx;
  151. }
  152. .cwjl-wrap {
  153. width: 660rpx;
  154. height: 180rpx;
  155. border-bottom: 1px solid #f5f5f5;
  156. margin: auto;
  157. padding: 10rpx 20rpx;
  158. color: #000;
  159. font-size: 28rpx;
  160. .jl-tit {
  161. }
  162. .jl-info {
  163. justify-content: space-between;
  164. .info-item {
  165. width: 33%;
  166. .item-name {
  167. color: #707a8a;
  168. padding: 20rpx 0 10rpx;
  169. }
  170. .item-val {
  171. padding: 10rpx 0;
  172. }
  173. }
  174. }
  175. }
  176. .btm-btn {
  177. width: 750rpx;
  178. height: 120rpx;
  179. padding: 20rpx;
  180. font-size: 28rpx;
  181. color: #000;
  182. justify-content: flex-start;
  183. position: fixed;
  184. bottom: 0;
  185. background-color: #fff;
  186. .btnbox_a {
  187. width: 198rpx;
  188. height: 80rpx;
  189. line-height: 80rpx;
  190. text-align: center;
  191. background: linear-gradient(to left, #eeb80d, #ffe35b);
  192. margin-right: 20rpx;
  193. border-radius: 20rpx;
  194. }
  195. .btnbox_b {
  196. width: 198rpx;
  197. height: 80rpx;
  198. line-height: 80rpx;
  199. text-align: center;
  200. background: #f5f5f5;
  201. margin-right: 20rpx;
  202. border-radius: 20rpx;
  203. }
  204. }
  205. </style>