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/components/contract-header/index.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/components/contract-header/index.vue b/src/components/contract-header/index.vue
index 826a3d4..37f88ae 100644
--- a/src/components/contract-header/index.vue
+++ b/src/components/contract-header/index.vue
@@ -14,7 +14,7 @@
               @click="onSidebar"
             /> -->
             <div class="flex pl-21 textColor" @click="onSidebar">
-              <div class="font-35">{{ symbol.toUpperCase() || "--" }}/USDT</div>
+              <div class="font-35">{{ newname }}</div>
               <div class="ml-15">{{ title }}</div>
             </div>
             <div
@@ -43,7 +43,7 @@
             :class="selectIndex == 2 ? 'select-active' : 'no-select'"
             @click="changeTab(2)"
           >
-            {{ $t("交割合约") }}
+            {{ $t("期权合约") }}
           </button>
         </div>
       </div>
@@ -86,7 +86,9 @@
           @click="onRoute(item)"
         >
           <div>
-            <div class="textColor">{{ item.name }}</div>
+            <div class="textColor">
+              {{ item.name }}
+            </div>
             <div class="text-grey mt-10">
               {{ selectIndex == 1 ? $t("永续") : $t("交割") }}
             </div>
@@ -108,7 +110,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 {
@@ -127,6 +129,10 @@
     //     type:String,
     //     default:''
     // },
+	newname: {
+	  type: String,
+	  default: "",
+	},
     symbol: {
       type: String,
       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,13 +173,15 @@
     };
   },
   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}`);
+        this.$router.push(`/trade/${item.symbol}`);
         this.$emit("update-coin", item.symbol);
         setStorage("symbol", item.symbol);
         this.onClose();
@@ -189,7 +198,12 @@
     },
     fetchList() {
       // 获取行情
-      _getHomeList(this.coins.join(",")).then((list) => {
+      const mainArray = this.coins.filter(
+        (item) => !this.newcoinArr.includes(item)
+      );
+	  
+
+      _getHomeList(mainArray.join(","),'desc').then((list) => {
         // console.log(list)
         this.list = list;
         if (this.timeout) {

--
Gitblit v1.9.3