From 08ac00389c5ae6166cf916d90cf403d517c29224 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Wed, 13 Nov 2024 15:56:25 +0800
Subject: [PATCH] 1

---
 src/components/trade-head/index.vue |   72 +++++++++++++++++++++++++++++++++---
 1 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/src/components/trade-head/index.vue b/src/components/trade-head/index.vue
index fe499c1..3c10f3d 100644
--- a/src/components/trade-head/index.vue
+++ b/src/components/trade-head/index.vue
@@ -5,13 +5,16 @@
       <div class="pl-30 pr-30">
         <div class="flex justify-between pt-45">
           <div class="flex">
-            <span
+           <!-- <span
               @click="
                 kineType
                   ? $router.push(`/trade/${symbol}`)
                   : $router.push(`/perpetualContract/${symbol}`)
               "
-            >
+            > -->
+			<span
+			  @click="$router.push(`/trade/${symbol}`)"
+			>
               <img
                 v-if="isReturn"
                 :src="require(`@/assets/theme/${theme}/image/icon_back.png`)"
@@ -27,10 +30,36 @@
               @click="onSidebar"
             /> -->
             <div class="flex flex-col pl-21" @click="onSidebar">
-              <div class="font-35 textColor">
-                <!-- {{ symbol | _symbolName(1) }} -->
-				{{symbol | newname}}
+              <div class="font-35 textColor" v-if="symbol=='mother'">
+				  ORBITAL
               </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='zkp'">
+			  				  ZYD
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='dia'">
+			  				  DEA
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='xeta'">
+			  				  AXFD
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='og'">
+			  				  SMK
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='fil'">
+			  				  FPP
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='ethw'">
+			  				  EGT
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='gas'">
+			  				  ASK
+			  </div>
+			  <div class="font-35 textColor" v-else-if="symbol=='axs'">
+			  				  JKRT
+			  </div>
+			  <div class="font-35 textColor" v-else>
+			  				{{symbol.toUpperCase()}}
+			  </div>
             </div>
             <div
               v-if="range"
@@ -85,6 +114,23 @@
       @closed="onClose"
     >
       <div class="pl-42 pr-40">
+		  <div class="px-32 py-13 flex">
+		    <div class="inputBoxbg h-60 w-full rounded-full flex items-center" style="background: #f5f5f5;">
+		      <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="flex justify-between mb-42 mt-53">
           <div class="flex items-center text-grey">
             <div class="mr-12">{{ $t("名称") }}</div>
@@ -205,6 +251,7 @@
       show: false,
       timeout: null,
       collected: "0",
+	  keywords:"",
       // title: '',
       list: arr, //[
       // { name:"BTC/USDT",close:"22042.28",change_ratio:"2.21"},
@@ -273,6 +320,19 @@
       this.show = true;
       this.fetchList();
     },
+	onInput(e) {
+		this.keywords = e.target.value
+	   this.coins = this.coins.filter(item => item.includes(e.target.value));
+	   if(!this.keywords){
+		   this.coins = this.coinList.map((item) => item.symbol);
+	   }
+	  // 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())
+	  // );
+	},
     fetchList() {
       // 获取行情
       const mainArray = this.coins.filter(
@@ -283,7 +343,7 @@
 		 //  symbol:mainArray.join(","),
 		 //  order:1,
 	  // }
-	  
+	  // mainArray = ['iop']
       _getHomeList(mainArray.join(","),'desc').then((list) => {
         // console.log(list)
         this.list = list;

--
Gitblit v1.9.3