交易所前端蓝色ui 4.5 jiem
lxf
2025-04-18 02a3d94d359b34e915f34abec024cbc1504a6a7c
src/views/wallet/spot.vue
@@ -25,9 +25,23 @@
      <div class="margin-top-bottom20">
        <total-assets :pageType="'financial'"></total-assets>
        <div class="tab-customize-box">
          <el-input v-model="bizhong" style="width: 150px;" placeholder="搜索币种"/>
          <el-button type="primary" style="margin-left: 10px;margin-right: 20px;" @click="getList">查询</el-button>
          <el-checkbox v-model="yangCangchecked" label="隐藏0资产" size="large" @change="getList" />
          <el-input
            v-model="bizhong"
            style="width: 150px"
            placeholder="搜索币种"
          />
          <el-button
            type="primary"
            style="margin-left: 10px; margin-right: 20px"
            @click="getList"
            >查询</el-button
          >
          <el-checkbox
            v-model="yangCangchecked"
            label="隐藏0资产"
            size="large"
            @change="getList"
          />
        </div>
      </div>
      <div>
@@ -44,34 +58,37 @@
              :label="$t('message.user.bizhong')"
              sortable
          ></el-table-column>
          <el-table-column
              :label="$t('message.user.keyong')"
              sortable
          >
          <el-table-column :label="$t('message.user.keyong')" sortable>
            <template #default="{row}">
               <span>{{row.money >= 0? row.money.toFixed(6): row.amount.toFixed(6)}}</span>
              <span>{{
                row.volume >= 0 ? row.volume.toFixed(6) : row.volume.toFixed(6)
              }}</span>
            </template>
          </el-table-column>
          <el-table-column
              :label="$t('message.user.dongjie')"
          >
          <el-table-column :label="$t('message.user.dongjie')">
            <template #default="{row}">
              <span>{{row.freeze_money >= 0? row.freeze_money.toFixed(6) : row.freeze_amount.toFixed(6)}}</span>
              <span>{{
                row.freeze_money >= 0
                  ? row.freeze_money.toFixed(6)
                  : row.freeze_amount.toFixed(6)
              }}</span>
            </template>
          </el-table-column>
          <el-table-column
              :label="$t('message.jiaoyi.suocang')"
          >
          <el-table-column :label="$t('message.jiaoyi.suocang')">
            <template #default="{row}">
              <span>{{row.lock_money >= 0? row.lock_money.toFixed(6) : row.lock_amount.toFixed(6)}}</span>
              <span>{{
                row.lock_money >= 0
                  ? row.lock_money.toFixed(6)
                  : row.lock_amount.toFixed(6)
              }}</span>
            </template>
          </el-table-column>
          <el-table-column
              :label="$t('message.user.jiedai')"
          >
          <el-table-column :label="$t('message.user.jiedai')">
            <template #default="{row}">
              <span>{{row.frozenAmount >= 0 ? row.frozenAmount.toFixed(6) : ''}}</span>
              <span>{{
                row.frozenAmount >= 0 ? row.frozenAmount.toFixed(6) : ""
              }}</span>
            </template>
          </el-table-column>
        </el-table>
@@ -193,13 +210,15 @@
<script>
import totalAssets from "./components/totalAssets.vue";
import Axios2 from "@/api/wallet.js";
import Axios from "@/utils/http";
export default {
  components: { totalAssets },
  name: "spot",
  data() {
    return {
      yangCangchecked:'',
      bizhong:'',
      yangCangchecked: "",
      bizhong: "",
      MenuChooseIndex: 1,
      total: 0,
      tableData: [], //理财列表数据
@@ -218,7 +237,10 @@
    //   this.heYueType = this.$route.query.type;
    // }
    this.getAssetsAll();
    this.$nextTick(() => {
    this.getList();
    });
    // this.getList();
    this.getMineList();
  },
  methods: {
@@ -230,22 +252,29 @@
    },
    //理财账户列表数据
    getList() {
      Axios2.getWalletList({}).then((res) => {
        let result = res.data
        let tableData = []
        for (let key in result){
          result[key].name = key
          tableData.push(result[key])
        }
        if (this.bizhong){
          this.tableData = tableData.filter(item => item.name == this.bizhong)
          return
        }
        if (this.yangCangchecked){
          this.tableData = tableData.filter(item => (item.money || item.amount ))
          return
        }
        this.tableData = tableData
      // Axios2.getWalletList({})
      Axios.fetch("wap/api/wallet!getAll.action").then((res) => {
        let result = res.data.extends;
        // let tableData = [];
        // for (let key in result) {
        //   result[key].name = key;
        //   tableData.push(result[key]);
        // }
        // if (this.bizhong) {
        //   this.tableData = tableData.filter(
        //     (item) => item.name == this.bizhong
        //   );
        //   return;
        // }
        // if (this.yangCangchecked) {
        //   this.tableData = tableData.filter(
        //     (item) => item.money || item.amount
        //   );
        //   return;
        // }
        this.tableData = res.data.extends;
        console.loog("----", this.tableData, res.data.extends);
      });
    },
    //矿池锁仓列表