From 045235121ba199cc885a8dd4f21b65fea8cdcc2a Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Thu, 09 Oct 2025 15:12:30 +0800
Subject: [PATCH] 1

---
 src/components/Transform/list-quotation/index.vue |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/components/Transform/list-quotation/index.vue b/src/components/Transform/list-quotation/index.vue
index ac397c4..3568206 100644
--- a/src/components/Transform/list-quotation/index.vue
+++ b/src/components/Transform/list-quotation/index.vue
@@ -20,7 +20,7 @@
         </div>
       </van-cell>
       <transition-group :name="type" tag="div">
-        <div v-if="active == 0" :key="active">
+        <div v-if="active == 0">
           <van-cell v-for="item in listData" :key="item.id">
             <ul class="flex justify-between w-full items-center" @click="onItemClick(item)">
               <li class="flex items-center left">
@@ -29,9 +29,7 @@
                   alt="logo" class="w-72 h-72 rounded-full mr-16" />
                 <p class="flex flex-col">
                   <span class="flex items-end font-32 flex items-center">
-                    <span class="textColor font-600 font-30">{{ item.symbol_data && item.symbol_data.toUpperCase() ||
-                      '--'
-                      }}</span>
+                    <span class="textColor font-600 font-30">{{ arrGk(item.name.toUpperCase())[0] }}</span>
                     <span class="font-24 text-grey" style="position: relative; top: 1px">
                       /USDT
                     </span>
@@ -42,11 +40,11 @@
                 </p>
               </li>
               <li class="flex flex-col items-end mid">
-                <p class="textColor font-32 font-600">{{ item.close || '--' }}</p>
+                <p class="textColor font-32 font-600">{{ item.close.toFixed(4) || '--' }}</p>
                 <p class="font-24 text-grey">{{ currency.currency_symbol }}
                   {{ item.close && item.symbol_data.toUpperCase() == 'SHIB' ? (item.close * currency.rate).toFixed(8) :
                     (item.close *
-                      currency.rate).toFixed(2) || '--' }}</p>
+                      currency.rate).toFixed(4) || '--' }}</p>
               </li>
               <li class="right flex items-center justify-end">
                 <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio > 0">
@@ -57,7 +55,7 @@
             </ul>
           </van-cell>
         </div>
-        <div v-else :key="active">
+        <div v-else>
           <van-cell v-for="item in showList" :key="item.id">
             <ul class="flex justify-between w-full items-center" @click="onItemClick(item)">
               <li class="flex items-center left">
@@ -65,9 +63,7 @@
                   class="w-72 h-72 rounded-full mr-16" />
                 <p class="flex flex-col">
                   <span class="flex items-end font-32 flex items-center">
-                    <span class="textColor font-600 font-30">{{ item.symbol_data && item.symbol_data.toUpperCase() ||
-                      '--'
-                      }}</span>
+                    <span class="textColor font-600 font-30">{{ arrGk(item.name.toUpperCase())[0] }}</span>
                     <!-- <span class="font-24 text-grey" style="position: relative; top: 1px">
                       {{ item.name && item.name.replace(item.symbol.toUpperCase(), '') || '--' }}</span> -->
                     <span class="font-24 text-grey" style="position: relative; top: 1px">
@@ -78,10 +74,10 @@
                 </p>
               </li>
               <li class="flex flex-col items-end mid">
-                <p class="textColor font-32 font-600">{{ item.close }}</p>
+                <p class="textColor font-32 font-600">{{ item.close.toFixed(4) }}</p>
                 <p class="font-24 text-grey">{{ currency.currency_symbol }} {{ item.close &&
                   item.symbol_data.toUpperCase() == 'SHIB' ? (item.close * currency.rate).toFixed(8) : (item.close *
-                    currency.rate).toFixed(2) || '--' }}</p>
+                    currency.rate).toFixed(4) || '--' }}</p>
               </li>
               <li class="right flex items-center justify-end text-right">
                 <div v-if="active == 3" class="textColor w-182 font-700 font-24">
@@ -121,6 +117,7 @@
       fixDate,
       HOST_URL,
       active: 0,
+      showList: [],
       type: 'left' //left 从左往右 right 从有王座
     }
   },
@@ -209,6 +206,12 @@
           return a - b;
         }
       }
+    },
+    // 处理分隔符
+    arrGk(str) {
+      if (!str) return ['--'];
+      let arr = str.split('/');
+      return arr;
     }
   },
   watch: {
@@ -223,6 +226,7 @@
         this.showList = [...this.listData].sort(this.compare("volume", 'up'))
       }
       this.$forceUpdate()
+      // console.log("aaaaaaaaa", this.showList, this.listData);
     }
   }
 }
@@ -240,7 +244,7 @@
     transition: all 250ms;
   }
 
-  .textColor{
+  .textColor {
     color: $text_color4;
   }
 

--
Gitblit v1.9.3