index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view>
  3. <card @updateShowMoneyStatus="(e) => showMoney = e">
  4. <template #cardnum>
  5. {{ legalAccount.usdt_totle || '--'}}
  6. </template>
  7. <template #cardnums>
  8. {{ legalAccount.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="legal-tender-box">
  20. <uni-table class="table-box" emptyText="暂无更多数据">
  21. <!-- 表头行 -->
  22. <uni-tr>
  23. <uni-th align="left" style="flex: 1;">币种</uni-th>
  24. <uni-th align="left" style="flex: 1;">账户权益</uni-th>
  25. <uni-th align="left" style="flex: 1;">冻结</uni-th>
  26. <uni-th align="right" style="flex: 1;">可用</uni-th>
  27. </uni-tr>
  28. <!-- 表格数据行 -->
  29. <template v-if="legalAccount.balance">
  30. <uni-tr v-for="item in legalAccount.balance">
  31. <uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
  32. <uni-td style="flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
  33. <uni-td style="flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
  34. <uni-td style="text-align: right; flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
  35. </uni-tr>
  36. </template>
  37. <!-- <uni-tr v-for="item in 5">
  38. <uni-td style="flex: 1;">USDT</uni-td>
  39. <uni-td style="flex: 1;">298587458</uni-td>
  40. <uni-td style="flex: 1;">00000</uni-td>
  41. <uni-td style="text-align: right, flex: 1;">29997.9123</uni-td>
  42. </uni-tr> -->
  43. </uni-table>
  44. </view>
  45. <capital-switch ref="capitalSwitchRef" />
  46. </view>
  47. </template>
  48. <script>
  49. import card from "../card.vue"
  50. import capitalSwitch from "./capital-switch.vue"
  51. import {
  52. checkBill
  53. } from "../card.js"
  54. import {
  55. mapGetters
  56. } from 'vuex'
  57. export default {
  58. name: 'legalTenderModules',
  59. components: {
  60. card,
  61. capitalSwitch
  62. },
  63. computed: {
  64. ...mapGetters([
  65. 'legalAccount',
  66. ])
  67. },
  68. data() {
  69. return {
  70. showMoney: true,
  71. cardMuen: [{
  72. icon: require('@/static/logo.png'),
  73. name: '资金划转'
  74. }, {
  75. icon: require('@/static/logo.png'),
  76. name: '用户账单',
  77. path: '/pages/property/bill?type=2'
  78. }],
  79. };
  80. },
  81. methods:{
  82. cardBtns(item) {
  83. const path = item?.path
  84. if (!path) {
  85. // 资金转换
  86. this.$nextTick(() => {
  87. this.$refs.capitalSwitchRef.open()
  88. })
  89. } else {
  90. // '用户账单',
  91. checkBill(path)
  92. }
  93. }
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. @import "~./../table.scss";
  99. .legal-tender-box {
  100. padding: 0 $pages-padding ;
  101. width: 100%;
  102. }
  103. </style>