123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <view>
- <card @updateShowMoneyStatus="(e) => showMoney = e">
- <template #cardnum>
- {{ legalAccount.usdt_totle || '--'}}
- </template>
- <template #cardnums>
- {{ legalAccount.totle || '--'}}
- </template>
- <template #cardmuen>
- <block v-for="(item , index ) in cardMuen">
- <view class="card-muen-item_1" @click.stop="cardBtns(item)">
- <image class="item-icon" :src="item.icon" mode="aspectFit"></image>
- <text class="item-name">{{item.name}}</text>
- </view>
- </block>
- </template>
- </card>
- <view class="legal-tender-box">
- <uni-table class="table-box" emptyText="暂无更多数据">
- <!-- 表头行 -->
- <uni-tr>
- <uni-th align="left" style="flex: 1;">币种</uni-th>
- <uni-th align="left" style="flex: 1;">账户权益</uni-th>
- <uni-th align="left" style="flex: 1;">冻结</uni-th>
- <uni-th align="right" style="flex: 1;">可用</uni-th>
- </uni-tr>
- <!-- 表格数据行 -->
- <template v-if="legalAccount.balance">
- <uni-tr v-for="(item , index) in legalAccount.balance" v-if="item.legal_balance > 0" :key="`legalAccount_${index}`">
- <uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
- <uni-td style="flex: 1;">{{ showMoney ? getNums(item.lock_legal_balance , item.legal_balance) : '*****' }}</uni-td>
- <uni-td style="flex: 1;">{{ showMoney ? item.lock_legal_balance : '*****' }}</uni-td>
- <uni-td style="text-align: right; flex: 1;">{{ showMoney ? item.legal_balance : '*****' }}</uni-td>
- </uni-tr>
- </template>
- </uni-table>
- </view>
-
- <capital-switch ref="capitalSwitchRef" />
- </view>
- </template>
- <script>
- import card from "../card.vue"
- import capitalSwitch from "./capital-switch.vue"
- import {
- checkBill
- } from "../card.js"
- import {
- mapGetters
- } from 'vuex'
- export default {
- name: 'legalTenderModules',
-
- components: {
- card,
- capitalSwitch
- },
- computed: {
- ...mapGetters([
- 'legalAccount',
- ])
- },
- data() {
- return {
- showMoney: true,
- cardMuen: [{
- icon: require('@/static/images/zichan/icon_01.png'),
- name: '资金划转'
- }, {
- icon: require('@/static/images/zichan/icon_02.png'),
- name: '用户账单',
- path: '/pages/property/bill?type=2'
- }],
- };
- },
- methods:{
- cardBtns(item) {
- const path = item?.path
-
- if (!path) {
- // 资金转换
- this.$nextTick(() => {
- this.$refs.capitalSwitchRef.open()
- })
- } else {
-
- // '用户账单',
- checkBill(path)
- }
-
- },
- getNums(a = 0, b = 0){
- return this.$decimalNum.add(a , b)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "~./../table.scss";
- .legal-tender-box {
- padding: 0 $pages-padding ;
- width: 100%;
- }
- </style>
|