0510航天交易所ui仿制,代码使用的jiem
lxf
2025-06-21 c42857f46e7c6fa6f8bb0b75f399707789c4ab72
src/components/perpetual-open/index.vue
@@ -196,16 +196,14 @@
                <!-- {{initFutrue.amount / (initData.amount + 0.0375) * form.lever_rate }}  //  -->
                <!-- {{ initFutrue.amount }} // 余额 -->
              </span>
              {{ form.lever_rate }}
              <!-- {{ form.lever_rate }} -->
              <span
                class="font-22 font-400 textColor"
                v-if="form.lever_rate == 25"
              >
                {{
                  Math.floor(
                    (initFutrue.amount / (initData.amount + 0.0375)) *
                      form.lever_rate
                  )
                  Math.floor(initFutrue.amount / (initData.amount + 0.0375)) *
                  form.lever_rate
                }}
                {{ $t("手数") }}
              </span>
@@ -214,10 +212,8 @@
                v-if="form.lever_rate == 50"
              >
                {{
                  Math.floor(
                    (initFutrue.amount / (initData.amount + 0.075)) *
                      form.lever_rate
                  )
                  Math.floor(initFutrue.amount / (initData.amount + 0.075)) *
                  form.lever_rate
                }}
                {{ $t("手数") }}
              </span>
@@ -226,10 +222,8 @@
                v-if="form.lever_rate == 100"
              >
                {{
                  Math.floor(
                    (initFutrue.amount / (initData.amount + 0.15)) *
                      form.lever_rate
                  )
                  Math.floor(initFutrue.amount / (initData.amount + 0.15)) *
                  form.lever_rate
                }}
                {{ $t("手数") }}
              </span>
@@ -238,10 +232,8 @@
                v-if="form.lever_rate == 200"
              >
                {{
                  Math.floor(
                    (initFutrue.amount / (initData.amount + 0.3)) *
                      form.lever_rate
                  )
                  Math.floor(initFutrue.amount / (initData.amount + 0.3)) *
                  form.lever_rate
                }}
                {{ $t("手数") }}
              </span>
@@ -748,6 +740,18 @@
          // 倍数
          obj.lever = [
            {
              id: 25,
              lever_rate: 25,
            },
            {
              id: 50,
              lever_rate: 50,
            },
            {
              id: 100,
              lever_rate: 100,
            },
            {
              id: 200,
              lever_rate: 200,
            },
@@ -873,33 +877,33 @@
      let vol;
      // vol = this.initOpen.volume / 1;
      if (this.form.lever_rate == 25) {
        vol = Math.floor(
          // (this.initFutrue.amount - this.initFutrue.amount * 0.0375) /
          //   this.initData.amount
          (this.initFutrue.amount / (this.initData.amount + 0.0375)) *
            this.form.lever_rate
        );
        vol =
          Math.floor(
            // (this.initFutrue.amount - this.initFutrue.amount * 0.0375) /
            //   this.initData.amount
            this.initFutrue.amount / (this.initData.amount + 0.0375)
          ) * this.form.lever_rate;
      } else if (this.form.lever_rate == 50) {
        vol = Math.floor(
          // (this.initFutrue.amount - this.initFutrue.amount * 0.0375) /
          //   this.initData.amount
          (this.initFutrue.amount / (this.initData.amount + 0.075)) *
            this.form.lever_rate
        );
        vol =
          Math.floor(
            // (this.initFutrue.amount - this.initFutrue.amount * 0.0375) /
            //   this.initData.amount
            this.initFutrue.amount / (this.initData.amount + 0.075)
          ) * this.form.lever_rate;
      } else if (this.form.lever_rate == 100) {
        vol = Math.floor(
          // (this.initFutrue.amount - this.initFutrue.amount * 0.15) /
          //   this.initData.amount
          (this.initFutrue.amount / (this.initData.amount + 0.15)) *
            this.form.lever_rate
        );
        vol =
          Math.floor(
            // (this.initFutrue.amount - this.initFutrue.amount * 0.15) /
            //   this.initData.amount
            this.initFutrue.amount / (this.initData.amount + 0.15)
          ) * this.form.lever_rate;
      } else {
        vol = Math.floor(
          // (this.initFutrue.amount - this.initFutrue.amount * 0.3) /
          //   this.initData.amount
          (this.initFutrue.amount / (this.initData.amount + 0.3)) *
            this.form.lever_rate
        );
        vol =
          Math.floor(
            // (this.initFutrue.amount - this.initFutrue.amount * 0.3) /
            //   this.initData.amount
            this.initFutrue.amount / (this.initData.amount + 0.3)
          ) * this.form.lever_rate;
      }
      return Math.floor(vol);
    },
@@ -1178,11 +1182,13 @@
            this.$refs.sliderRef.emptyValue();
          }
          this.$toast(this.$t("操作成功"));
          _getBalance().then((data) => {
            // 刷新余额
            this.$store.commit("user/SET_USERINFO", {
              balance: data.money,
            });
            location.reload();
          });
          this.$emit("ordered", emitFunc);
          if (this.selectIndex / 1 === 2) {