From d5db05869b00fb72b4944f1fdcfa147eae854bc8 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Fri, 20 Jun 2025 11:35:30 +0800
Subject: [PATCH] 修改默认

---
 src/components/constract/PerpetualContract/orderCom/amountSlider.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/components/constract/PerpetualContract/orderCom/amountSlider.vue b/src/components/constract/PerpetualContract/orderCom/amountSlider.vue
index 46a622a..97b5b7e 100644
--- a/src/components/constract/PerpetualContract/orderCom/amountSlider.vue
+++ b/src/components/constract/PerpetualContract/orderCom/amountSlider.vue
@@ -180,13 +180,17 @@
           default:
             sxf = 0;
         }
-        const fl =
-          this.walletMoney * sxf * this.initOpen.amount * this.lever_rate * rate;
+        // const fl =
+        // this.walletMoney * sxf * this.initOpen.amount * this.lever_rate * rate;
+        // const maxAmount =
+        // this.walletMoney * this.initOpen.amount * this.lever_rate;
         const maxAmount =
-          this.walletMoney * this.initOpen.amount * this.lever_rate;
+          Math.floor(this.walletMoney / (1 + sxf)) * this.lever_rate;
+        const fl = maxAmount * sxf;
         console.log(maxAmount * rate, fl);
 
-        data = maxAmount * rate - fl;
+        // data = maxAmount * rate - fl;
+        data = maxAmount;
 
         // if (this.lever_rate) {
         //   data = math.format((this.maxAmount * rate), 2);

--
Gitblit v1.9.3