index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view class="">
  3. <card @updateShowMoneyStatus="(e) => showMoney = e">
  4. <template #cardnum>
  5. {{ GiftMoneyAccount.usdt_totle || '--'}}
  6. </template>
  7. <template #cardnums>
  8. {{ GiftMoneyAccount.CNY || '--'}}
  9. </template>
  10. <template #cardmuen>
  11. <block v-for="(item , index ) in cardMuen">
  12. <view class="card-muen-item_1" @click.stop="cardBtns(item)">
  13. <image class="item-icon" :src="item.icon" mode="aspectFit"></image>
  14. <text class="item-name">{{item.name}}</text>
  15. </view>
  16. </block>
  17. </template>
  18. </card>
  19. <view class="gift-money">
  20. <view class="lable-title">保证金</view>
  21. <uni-table class="table-box" emptyText="暂无更多数据">
  22. <!-- 表头行 -->
  23. <uni-tr>
  24. <uni-th align="left">可用保证金</uni-th>
  25. <uni-th align="center">已用保证金</uni-th>
  26. <uni-th align="right">冻结</uni-th>
  27. </uni-tr>
  28. <!-- 表格数据行 -->
  29. <uni-tr>
  30. <uni-td>124.8028 USDT</uni-td>
  31. <uni-td style="text-align: center;">100.0000 USDT</uni-td>
  32. <uni-td style="text-align: right;">29997.9123</uni-td>
  33. </uni-tr>
  34. </uni-table>
  35. <view class="account-money">
  36. <view class="money-item">
  37. 赠金账户 124.8028 USDT
  38. </view>
  39. <view class="money-item">
  40. 盈利账户 0.0000 USDT
  41. </view>
  42. </view>
  43. <gap />
  44. <view class="lable-title">盈亏</view>
  45. <view class="Profit-loss">
  46. <view class="Profit-loss-lable">
  47. 浮动盈亏
  48. </view>
  49. <view class="Profit-loss-value">
  50. -1.8767 USDT
  51. </view>
  52. </view>
  53. </view>
  54. <capital-switch ref="capitalSwitchRef" />
  55. </view>
  56. </template>
  57. <script>
  58. import card from "../card.vue"
  59. import capitalSwitch from "./capital-switch.vue"
  60. import {
  61. checkBill
  62. } from "../card.js"
  63. import {
  64. mapGetters
  65. } from 'vuex'
  66. export default {
  67. name: 'GiftMoney',
  68. computed: {
  69. ...mapGetters([
  70. 'GiftMoneyAccount',
  71. ])
  72. },
  73. components: {
  74. card,
  75. capitalSwitch
  76. },
  77. data() {
  78. return {
  79. showMoney: true,
  80. cardMuen: [{
  81. icon: require('@/static/logo.png'),
  82. name: '资金划转',
  83. btn: "GiftMoney"
  84. }, {
  85. icon: require('@/static/logo.png'),
  86. name: '用户账单',
  87. path: '/pages/property/bill?type=3'
  88. }]
  89. };
  90. },
  91. methods:{
  92. cardBtns(item) {
  93. const btn = item?.btn
  94. const path = item?.path
  95. if (btn) {
  96. // 资金转换
  97. this.$nextTick(() => {
  98. this.$refs.capitalSwitchRef.open()
  99. })
  100. } else if(path){
  101. // '用户账单',
  102. checkBill(path)
  103. }
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .gift-money {
  110. width: 100%;
  111. .lable-title {
  112. font-size: 28rpx;
  113. font-family: PingFang SC, PingFang SC-Bold;
  114. font-weight: 700;
  115. color: #1a1a1a;
  116. padding: 30rpx $pages-padding 11rpx;
  117. border-bottom: 1px solid #e6e6e6;
  118. }
  119. }
  120. .table-box {
  121. padding: 0 $pages-padding;
  122. ::v-deep .uni-table-tr {
  123. .uni-table-th {
  124. border: none;
  125. font-size: 22rpx;
  126. font-family: PingFang SC, PingFang SC-Regular;
  127. font-weight: 400;
  128. color: #1a1a1a;
  129. }
  130. .uni-table-td {
  131. border: none;
  132. font-size: 26rpx;
  133. font-family: PingFang SC, PingFang SC-Bold;
  134. font-weight: 700;
  135. color: #1a1a1a;
  136. }
  137. .uni-table-th {
  138. padding: 20rpx 0 0;
  139. &:nth-child(2) {
  140. padding: 20rpx 20rpx 0;
  141. }
  142. }
  143. .uni-table-td {
  144. padding: 12rpx 0 20rpx;
  145. &:nth-child(2) {
  146. padding: 12rpx 20rpx 0;
  147. }
  148. }
  149. }
  150. }
  151. .account-money {
  152. padding: 0 $pages-padding;
  153. font-size: 22rpx;
  154. font-family: PingFang SC, PingFang SC-Regular;
  155. font-weight: 400;
  156. color: #808080;
  157. line-height: 30rpx;
  158. .money-item {
  159. padding-bottom: 12rpx;
  160. &:last-child {
  161. padding-bottom: 30rpx;
  162. }
  163. }
  164. }
  165. .Profit-loss {
  166. width: 100%;
  167. padding: 0 $pages-padding;
  168. .Profit-loss-lable {
  169. padding: 20rpx 0 12rpx;
  170. font-size: 22rpx;
  171. font-family: PingFang SC, PingFang SC-Regular;
  172. font-weight: 400;
  173. color: #1a1a1a;
  174. line-height: 30rpx;
  175. }
  176. .Profit-loss-value {
  177. font-size: 26rpx;
  178. font-family: PingFang SC, PingFang SC-Bold;
  179. font-weight: 700;
  180. color: #1a1a1a;
  181. line-height: 37rpx;
  182. }
  183. }
  184. </style>