From b27cbd67a587c040d9acbb06417456116682043a Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Mon, 26 Jan 2026 11:29:13 +0800
Subject: [PATCH] 1

---
 src/views/ICO/ico.vue |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/views/ICO/ico.vue b/src/views/ICO/ico.vue
index a210695..f8c429c 100644
--- a/src/views/ICO/ico.vue
+++ b/src/views/ICO/ico.vue
@@ -91,7 +91,7 @@
                 </div>
                 <div class="info-row">
                     <div class="info-label">{{ $t('盈亏') }}</div>
-                    <div class="info-value red">
+                    <div class="info-value" :class="getProfitClass(recordData.profit)">
                         {{ recordData.profitPercent ? (recordData.profitPercent + '%') : '--%' }}
                         ({{ recordData.profit || '0.00' }}USDT)
                     </div>
@@ -237,6 +237,18 @@
     }).catch(err => {
         showToast(err.msg || err || t('申购失败'))
     })
+}
+
+// 根据盈亏值返回对应的样式类
+const getProfitClass = (profit) => {
+    if (!profit && profit !== 0) return ''
+    const profitNum = parseFloat(profit)
+    if (profitNum > 0) {
+        return 'green'
+    } else if (profitNum < 0) {
+        return 'red'
+    }
+    return ''
 }
 
 // 卖出
@@ -456,6 +468,10 @@
                     &.red {
                         color: #f43368;
                     }
+
+                    &.green {
+                        color: #06CDA5;
+                    }
                 }
             }
 

--
Gitblit v1.9.3