交易所前端蓝色ui 4.5 jiem
jhzh
2025-05-19 c5487881d04780e03f4dd86ed1606c587f2c7952
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);
    },