From c5487881d04780e03f4dd86ed1606c587f2c7952 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 19 May 2025 16:30:54 +0800
Subject: [PATCH] 修改: 保证金 、 手续费 字段展示
---
src/components/constract/PerpetualContract/createOrder.vue | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/components/constract/PerpetualContract/createOrder.vue b/src/components/constract/PerpetualContract/createOrder.vue
index 7513e48..b848d0d 100644
--- a/src/components/constract/PerpetualContract/createOrder.vue
+++ b/src/components/constract/PerpetualContract/createOrder.vue
@@ -144,7 +144,7 @@
<!-- 保证金 -->
<div class="submit-info-item">
<div>{{ $t("message.home.baozhengjin") }}:</div>
- <div>{{ getMargin }} {{ unit }}</div>
+ <div>{{ getMargins }} {{ unit }}</div>
</div>
<!-- 手续费 -->
<div class="submit-info-item">
@@ -313,6 +313,23 @@
}
return bigDecimal.round(data, 2);
},
+ getMargins: function () {
+ const amount = this.inputAmount;
+ let data = "0.00";
+ if (
+ this.isActive === 0 &&
+ amount != undefined &&
+ this.lever_rate.length != undefined &&
+ this.sessionObj.amount
+ ) {
+ if (this.lever_rate.length > 0) {
+ data = this.sessionObj.amount * amount ;
+ } else if (this.lever_rate.length == 0) {
+ data = this.sessionObj.amount * amount * 1;
+ }
+ }
+ return bigDecimal.round(data, 2);
+ },
// 获取保证金,开仓才需要
getMargin: function () {
const amount = this.inputAmount;
@@ -337,7 +354,7 @@
let data = "0.00";
if (amount && this.isActive == 0) {
// 每手的数量*多少手(张)*每手的手续费
- data = amount * this.sessionObj.fee;
+ data = amount * this.current_lever_rate_num * this.sessionObj.fee;
}
return bigDecimal.round(data, 2);
},
--
Gitblit v1.9.3