李凌
2025-12-16 9337c3cf960b60078558b7f942fd27f1ab39364b
src/components/Transform/perpetual-open/index.vue
@@ -123,9 +123,10 @@
              <!-- 张数输入 -->
              <!-- <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>
              <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">
@@ -152,7 +153,7 @@
              </div>
            </template>
            <div class="flex font-24 text-grey justify-between mt-32" >
            <div class="flex font-24 text-grey justify-between mt-32">
              <div>{{ $t("可用USDT") }}</div>
              <div class="textColor">{{ initFutrue.amount }} USDT</div>
            </div>
@@ -257,7 +258,7 @@
                    '%,rgba(246,70,93,.1) 100%)',
                }"> -->
              <div v-show="(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'
@@ -541,13 +542,13 @@
    return {
      THEME,
      fixDate,
     bfbindex:null,
     bfblist:[
        {name:'25'},
        {name:'50'},
        {name:'75'},
        {name:'100'}
     ],
      bfbindex: null,
      bfblist: [
        { name: '25' },
        { name: '50' },
        { name: '75' },
        { name: '100' }
      ],
      currentBuyType: '', // 交割合约当前下单的类型,用于弹窗倒计时结束以后,点击再下一单
      timeout2: null,
      timeout: null,
@@ -624,14 +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
   },
    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) {
@@ -956,24 +957,28 @@
<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_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_box {
  width: 23%;
  border: 1px solid #cbcbcb;
  text-align: center;
  border-radius: 10px;
}
.btns_box{
   display: flex;
   justify-content: space-between;
   align-items: center;
.btns_box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#cryptos {
  .perpetual-open {
    font-size: 26px;
@@ -1156,7 +1161,10 @@
    .van-action-sheet__item {
      background: transparent !important;
      color: $text_color;
      @include themify() {
        color: themed("text_color");
      }
    }
  }