From 4cbc5a9d0f04b1d9b1f44563a5f99af9fb35e470 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Mon, 30 Jun 2025 15:59:57 +0800
Subject: [PATCH] 盈利率

---
 src/views/wealth/transactionRecord.vue |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/views/wealth/transactionRecord.vue b/src/views/wealth/transactionRecord.vue
index abd25e4..000bf45 100644
--- a/src/views/wealth/transactionRecord.vue
+++ b/src/views/wealth/transactionRecord.vue
@@ -91,14 +91,11 @@
                 <div class="el-col el-col-8">
                   <div>{{ $t("message.home.yingkui") }}</div>
                   <div class="value" :class="item.profit > 0 ? 'green' : 'red'">
+                    <!-- (profit/deposit_open)   -->
                     {{ item.profit }}/{{
                       (() => {
-                        const base =
-                          item.close_avg_price * item.amount_open || 1;
-                        let percent = (parseFloat(item.profit) / base) * 100;
-                        if (percent !== 0 && Math.abs(percent) < 0.000001) {
-                          percent = percent > 0 ? 0.000001 : -0.000001;
-                        }
+                        let percent =
+                          (parseFloat(item.profit) / item.deposit_open) * 100;
                         return percent.toFixed(6);
                       })()
                     }}%

--
Gitblit v1.9.3