1
李凌
2026-01-21 e01cee0f0c5c5c2eb2d8595eadb3c7a9df2a37fc
src/components/Transform/perpetual-open/index.vue
@@ -121,8 +121,12 @@
  <span class="flex-1 text-right">100%</span>
</div> -->
              <!-- 张数输入 -->
              <amount-slider ref="sliderRef" :maxAmount="maxUSDT" @getAmount="getAmount"
                :propsAmount="form.amount"></amount-slider>
              <!-- <amount-slider ref="sliderRef" :maxAmount="maxUSDT" @getAmount="getAmount"
                :propsAmount="form.amount"></amount-slider> -->
              <div class="btns_box">
                <div :class="bfbindex == index ? 'btns_box_boxs' : 'btns_box_box'" @click="bfbclick(item, index)"
                  v-for="(item, index) in bfblist" :key="index">{{ item.name }}%</div>
              </div>
            </template>
            <template v-if="selectIndex == 1 && userInfo.token">
              <div class="flex justify-between mt-30">
@@ -134,13 +138,12 @@
                  <span>{{ 'USDT' }}</span>
                </div>
              </div>
              <div class="flex justify-between mt-30">
              <!-- <div class="flex justify-between mt-30">
                <div class="text-grey">{{ $t("保证金") }}</div>
                <div class="textColor">
                  <!-- {{ (initData.amount * (form.amount / 1)) }} {{ queryType === 'cryptos' ? 'USDT' : 'USD' }} -->
                  {{ form.lever_rate * form.amount }} {{ 'USDT' }}
                </div>
              </div>
              </div> -->
              <div class="flex justify-between mt-30">
                <div class="text-grey">{{ $t("建仓手续费") }}</div>
                <div class="textColor">{{ reserve(userInfo.perpetual_contracts_status === '1' ?
@@ -150,9 +153,9 @@
              </div>
            </template>
            <div class="flex font-24 text-grey justify-between mt-32" v-if="selectIndex == 2">
            <div class="flex font-24 text-grey justify-between mt-32">
              <div>{{ $t("可用USDT") }}</div>
              <div class="textColor">{{ initFutrue.amount }} {{ queryType === 'cryptos' ? 'USDT' : 'USD' }}</div>
              <div class="textColor">{{ initFutrue.amount }} USDT</div>
            </div>
            <div class="flex font-24 text-grey justify-between mt-20"
              v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'">
@@ -255,7 +258,7 @@
                    '%,rgba(246,70,93,.1) 100%)',
                }"> -->
              <div v-if="showType == 0 || showType == 2" class="w-290 flex justify-between pt-1 font-26"
              <div v-show="(showType == 0 || showType == 2)" class="w-290 flex justify-between pt-1 font-26"
                v-for="(item, index) in redData" :key="item + index" @click="onQuickPrice(item.price)" :style="{
                  background:
                    `linear-gradient(to right,${THEME == 'dark' ? '#131A2E' : '#fff'
@@ -539,6 +542,13 @@
    return {
      THEME,
      fixDate,
      bfbindex: null,
      bfblist: [
        { name: '25' },
        { name: '50' },
        { name: '75' },
        { name: '100' }
      ],
      currentBuyType: '', // 交割合约当前下单的类型,用于弹窗倒计时结束以后,点击再下一单
      timeout2: null,
      timeout: null,
@@ -615,6 +625,14 @@
  },
  methods: {
    reserve,
    bfbclick(e, i) {
      this.bfbindex = i
      e = parseInt(e.name)
      const rate = e / 100; //如0.25
      this.form.amount = this.maxUSDT * rate
      var a = this.form.amount
      this.form.amount = Math.floor(a * 100) / 100
    },
    //获取张数
    getAmount(val) {
      if (!val) {
@@ -940,6 +958,27 @@
<style lang="scss">
@import "@/assets/init.scss";
.btns_box_boxs {
  width: 23%;
  border: 1px solid #F7B600;
  text-align: center;
  border-radius: 10px;
  color: #F7B600;
}
.btns_box_box {
  width: 23%;
  border: 1px solid #cbcbcb;
  text-align: center;
  border-radius: 10px;
}
.btns_box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#cryptos {
  .perpetual-open {
    font-size: 26px;
@@ -1122,7 +1161,10 @@
    .van-action-sheet__item {
      background: transparent !important;
      color: $text_color;
      @include themify() {
        color: themed("text_color");
      }
    }
  }