123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view class="">
- <card @updateShowMoneyStatus="(e) => showMoney = e">
- <template #cardnum>
- {{ contractAccount.usdt_totle || '--'}}
- </template>
- <template #cardnums>
- {{ contractAccount.CNY || '--'}}
- </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="contractAccount.balance">
- <uni-tr v-for="item in contractAccount.balance">
- <uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
- <uni-td style="flex: 1;">{{ showMoney ? getNums(item.lock_lever_balance , item.usdt_price) : '*****' }}</uni-td>
- <uni-td style="flex: 1;">{{ showMoney ? item.lock_lever_balance : '*****' }}</uni-td>
- <uni-td style="text-align: right; flex: 1;">{{ showMoney ? item.usdt_price : '*****' }}</uni-td>
- </uni-tr>
- </template>
- </uni-table>
- </view>
-
- <capital-switch ref="capitalSwitchRef" />
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from 'vuex'
- import capitalSwitch from "./capital-switch.vue"
- import card from "../card.vue"
- import {
- checkBill
- } from "../card.js"
- export default {
- name: 'contractModules',
- components: {
- card,
- capitalSwitch
- },
-
- data() {
- return {
- showMoney:false,
- cardMuen: [{
- icon: require('@/static/logo.png'),
- name: '资金划转',
- btn: "capitalSwitch"
- }, {
- icon: require('@/static/logo.png'),
- name: '用户账单',
- path: '/pages/property/bill?type=0'
- }],
- };
- },
-
- computed: {
- ...mapGetters([
- 'contractAccount',
- ])
- },
- methods: {
- cardBtns(item) {
- const btn = item?.btn
- const path = item?.path
- if (btn) {
- // 资金转换
- this.$nextTick(() => {
- this.$refs.capitalSwitchRef.open()
- })
- } else if(path){
-
- // '用户账单',
- checkBill(path)
- }
- },
- //
- getNums(a,b){
- return this.$decimalNum.add(a,b)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "~./../table.scss";
- .legal-tender-box {
- // padding: 0 $pages-padding ;
- width: 100%;
- }
- .table-box {
- padding: 0 $pages-padding ;
- }
- </style>
|