From ae313a0f7cc9fa2cdc469e663832f8b1dd82c655 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Sat, 20 Apr 2024 18:28:12 +0800
Subject: [PATCH] first
---
src/components/contract-header/index.vue | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/components/contract-header/index.vue b/src/components/contract-header/index.vue
index 826a3d4..8d144b7 100644
--- a/src/components/contract-header/index.vue
+++ b/src/components/contract-header/index.vue
@@ -86,7 +86,13 @@
@click="onRoute(item)"
>
<div>
- <div class="textColor">{{ item.name }}</div>
+ <div class="textColor">
+ {{
+ item.name
+ ? item.symbol.toUpperCase() + "/" + item.name.split("/")[1]
+ : "--"
+ }}
+ </div>
<div class="text-grey mt-10">
{{ selectIndex == 1 ? $t("永续") : $t("交割") }}
</div>
@@ -108,7 +114,7 @@
<script>
import { Popup } from "vant";
-import { mapGetters } from "vuex";
+import { mapActions, mapGetters } from "vuex";
import { _getHomeList } from "@/API/home.api";
import { setStorage } from "@/utils/utis";
export default {
@@ -147,6 +153,7 @@
...mapGetters({
coinList: "home/coinList",
theme: "home/theme",
+ newcoinArr: "home/newcoinArr",
}),
title() {
return [this.$t("永续"), this.$t("交割")][this.selectIndex - 1];
@@ -166,10 +173,12 @@
};
},
created() {
+ this.NEW_CION_LIST();
// this.coins = this.coinList.map(item => item.symbol)
// console.log('this.coins', this.coins)
},
methods: {
+ ...mapActions("home", ["NEW_CION_LIST"]),
onRoute(item) {
if (this.$route.params.symbol !== item.symbol) {
this.$router.push(`/perpetualContract/${item.symbol}`);
@@ -189,7 +198,10 @@
},
fetchList() {
// 获取行情
- _getHomeList(this.coins.join(",")).then((list) => {
+ const mainArray = this.coins.filter(
+ (item) => !this.newcoinArr.includes(item)
+ );
+ _getHomeList(mainArray.join(",")).then((list) => {
// console.log(list)
this.list = list;
if (this.timeout) {
--
Gitblit v1.9.3