From 25b2ba1cf86bc3439e7ad2acf2cd4a9ea7e4b0ed Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Fri, 28 Jun 2024 09:28:04 +0800
Subject: [PATCH] 123
---
src/page/assetsCenter/index.vue | 70 ++++++++++++++++++++++++-----------
1 files changed, 48 insertions(+), 22 deletions(-)
diff --git a/src/page/assetsCenter/index.vue b/src/page/assetsCenter/index.vue
index 57fb534..69041cb 100644
--- a/src/page/assetsCenter/index.vue
+++ b/src/page/assetsCenter/index.vue
@@ -3,14 +3,14 @@
<header>
<van-row class="title-box">
<van-col span="12">
- <span class="title">{{ $t("总资产") }}</span>
+ <!-- <span class="title">{{ $t("总资产") }}</span> -->
</van-col>
<van-col span="12" class="right">
<div class="w-33" style="height: 20px">{{ " " }}</div>
<!-- <img :src="require('@/assets/3x/names8.png')" class="w-33" /> -->
</van-col>
<div class="pt">{{ $t("总资产估值") }}</div>
- <div class="pt">{{ assetsFunds.total }}</div>
+ <!-- <div class="pt">{{ assetsFunds.total }}</div> -->
<div class="pt">
≈ {{ currency.currency_symbol
}}{{
@@ -20,7 +20,6 @@
}}
</div>
</van-row>
-
<van-row gutter="20" class="but-box">
<van-col
span="8"
@@ -43,7 +42,6 @@
{{ item.text }}
</div>
</div>
-
<div class="tabs-content">
<div>{{ allName }} {{ $t("总资产") }}</div>
<div class="tabs-name">
@@ -51,13 +49,28 @@
</div>
</div>
</div>
-
<main>
<template v-if="loading">
<van-loading />
</template>
-
<template v-if="active === 1">
+ <div class="px-32 py-13 flex">
+ <div class="inputBoxbg h-60 w-full rounded-full flex items-center">
+ <input
+ style="padding-left: 10px"
+ type="text"
+ v-model="keywords"
+ :placeholder="$t('搜索币种')"
+ class="h-full flex-1 search-input border-none bg-none"
+ @input="onInput"
+ />
+ <img
+ src="@/assets/3x/资源 22@3x.png"
+ alt="logo"
+ class="w-32 h-32 mx-16"
+ />
+ </div>
+ </div>
<div class="item-box" v-for="(item, index) in funds" :key="index">
<div class="title-main">{{ item.symbol.toUpperCase() }}/USDT</div>
<van-row>
@@ -66,7 +79,7 @@
<div class="text">
{{
item.usable.toFixed(
- item.symbol.toUpperCase() === "USDT" ? 6 : 8
+ item.symbol.toUpperCase() === "USDT" ? 2 : 2
) || "0.0"
}}
</div>
@@ -76,7 +89,7 @@
<div class="text">
{{
item.lock_amount.toFixed(
- item.symbol.toUpperCase() === "USDT" ? 6 : 8
+ item.symbol.toUpperCase() === "USDT" ? 2 : 2
) || "0.0"
}}
</div>
@@ -86,7 +99,7 @@
<div class="text">
{{
(item.frozenAmount + item.freeze_amount).toFixed(
- item.symbol.toUpperCase() === "USDT" ? 6 : 8
+ item.symbol.toUpperCase() === "USDT" ? 2 : 2
) || "0.0"
}}
</div>
@@ -117,18 +130,15 @@
<script>
import { _getAllWallet } from "@/API/fund.api";
import Axios from "@/API/assets";
-
import { mapActions, mapGetters } from "vuex";
import { _futrueOrderList, _orderListHold } from "@/API/trade.api";
import PerpetualPositionList from "@/components/perpetual-position-list/index.vue";
import futrueHoldList from "@/page/deliveryContract/hold.vue";
import financialList from "@/components/assetsCenter/financialList";
-
import {
getfinacialProductsBought,
getMachineBought,
} from "@/API/financialManagement";
-
export default {
components: {
PerpetualPositionList,
@@ -137,6 +147,7 @@
},
data() {
return {
+ keywords: "",
loading: true,
active: 1,
tabList1: [
@@ -151,11 +162,11 @@
text: this.$t("提币"),
route: "/withdraw/withdrawPage",
},
- // {
- // id: 4,
- // text: this.$t("闪兑"),
- // route: "/exchange/exchangePage",
- // },
+ {
+ id: 4,
+ text: this.$t("闪兑"),
+ route: "/exchange/exchangePage",
+ },
{
id: 5,
text: this.$t("货币理财"),
@@ -175,11 +186,12 @@
],
tabList: [
{ id: 1, text: this.$t("现货") },
- { id: 2, text: this.$t("交割合约") },
+ { id: 2, text: this.$t("期权合约") },
{ id: 4, text: this.$t("永续合约") },
{ id: 5, text: this.$t("理财") },
],
funds: [],
+ fundsDatra: [],
tabListData: {},
assetsFunds: {},
};
@@ -250,6 +262,15 @@
},
methods: {
...mapActions("user", ["GET_UERS_KYC"]),
+ onInput(e) {
+ console.log(333, this.fundsDatra);
+ this.funds = this.fundsDatra.filter((item) =>
+ item.symbol.includes(e.target.value.toLocaleLowerCase())
+ );
+ // this.fundsDatra[index]["data"] = this.tabList[index]["data"].filter(
+ // (item) => item.symbol.includes(e.target.value.toLocaleLowerCase())
+ // );
+ },
routerList(item) {
this.$router.push({ path: item.route, query: item.query });
@@ -330,6 +351,7 @@
let list = res.extends;
if (this.active === 1) {
this.funds = list;
+ this.fundsDatra = list;
}
});
},
@@ -347,7 +369,7 @@
<style lang="scss" scoped>
.assets-box {
header {
- padding: 100px 0 0px;
+ // padding: 100px 0 0px;
color: #817cf6;
.title-box {
padding: 0 70px;
@@ -382,12 +404,12 @@
color: #363636;
.tabs-name {
margin-left: 10px;
- color: #dedbe2;
+ // color: #dedbe2;
}
}
.tabs-box {
display: flex;
- color: #dedbe2;
+ // color: #dedbe2;
font-weight: 400;
flex: 1;
justify-content: space-between;
@@ -411,7 +433,7 @@
margin-bottom: 20px;
}
.title {
- color: #dedbe2;
+ // color: #dedbe2;
margin-bottom: 10px;
}
.text {
@@ -423,4 +445,8 @@
text-align: center;
margin: 30px 0;
}
+
+.items-center {
+ background: #f5f5f5;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3