1
李凌
5 days ago 349c48e168b9f2580334422228acde7d1b21bede
src/components/Transform/perpetual-open/index.vue
@@ -62,8 +62,11 @@
                </div>
              </div>
            </template>
            <contract-futrue v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'" class="mb-20"
            <contract-futrue v-if="selectIndex == 2 && hasFutruePara" class="mb-20"
              :initFutrue="initFutrue" @paraId="onParaId" />
            <div v-else-if="selectIndex == 2" class="text-grey font-26 py-20 text-center mb-20">
              {{ $t('暂无交割周期配置,请联系客服') }}
            </div>
            <div class="h-76 lh-76 greyBg mb-30 flex pr-20 justify-center rounded-lg textColor" v-if="selectIndex == 1">
              <input placeholder="" class="greyBg w-full pl-20  h-76 border-none text-left rounded-lg"
                :disabled="type / 1 === 1" @focus="focus = true" v-model="form.price" />
@@ -79,7 +82,7 @@
              <input v-if="selectIndex == 1" placeholder="USDT" class="border-none greyBg text-center textColor"
                style="width: 17rem;border-radius: 5rem;" v-model="form.amount" type="number" @input="onInput" />
              <input v-if="selectIndex == 2 && JSON.stringify(initFutrue.para) != '[]'"
              <input v-if="selectIndex == 2 && hasFutruePara"
                :placeholder="($t('最少') + initFutrue && initFutrue.para ? $t('最小金额') + initFutrue.para[paraIndex].buy_min : '')"
                class="border-none greyBg text-center textColor" style="width: 17rem;border-radius: 5rem;"
                v-model="form.amount" type="number" @input="onInput" />
@@ -158,15 +161,15 @@
              <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) != '[]'">
              v-if="selectIndex == 2 && hasFutruePara">
              <div>{{ $t("手续费") }}</div>
              <div class="textColor">
                {{
                  (
                    form.amount *
                    (initFutrue && initFutrue.para
                      ? initData.para[paraIndex].unit_fee
                      : "")
                      ? initFutrue.para[paraIndex].unit_fee
                      : 0)
                  ).toFixed(2)
                }}
                {{ queryType === 'cryptos' ? 'USDT' : 'USD' }}
@@ -200,7 +203,7 @@
                  </div>
                </div>
              </template>
              <template v-if="selectIndex == 2">
              <template v-if="selectIndex == 2 && hasFutruePara">
                <div class="w-full h-80 lh-80 bg-green flex text-white rounded-ban mt-10 " @click="order('open')"
                  v-if="userInfo.token">
                  <div class="font-34 relative text-center" style="flex-grow: 1">
@@ -508,6 +511,9 @@
  computed: {
    ...mapGetters('user', ['userInfo']),
    ...mapGetters('home', ['currency']),
    hasFutruePara() {
      return Array.isArray(this.initFutrue?.para) && this.initFutrue.para.length > 0
    },
    initData() {
      let obj = null
      if (this.selectIndex / 1 === 1) {