123
dcc
2024-06-28 25b2ba1cf86bc3439e7ad2acf2cd4a9ea7e4b0ed
src/components/perpetual-open/index.vue
@@ -170,14 +170,14 @@
        </div>
        <div class="w-440 flex flex-col">
          <template v-if="selectIndex == 1">
            <div class="flex items-center h-66 rounded-lg text-grey">
              <p
            <!-- <div class="flex items-center h-66 rounded-lg text-grey"> -->
             <!-- <p
                class="font-28 flex-1 flex items-center justify-center h-66 long"
                :class="currentType == 'long' ? 'long' : ''"
                @click="changeTab('long')"
              >
                {{ $t("开多") }}
              </p>
              </p> -->
              <!-- <p
                class="font-28 flex-1 ml-20 flex items-center justify-center h-66 short"
                :class="currentType == 'short' ? 'short' : ''"
@@ -185,7 +185,7 @@
              >
                {{ $t("开空") }}
              </p> -->
            </div>
            <!-- </div> -->
            <div class="mt-30 mb-30" style="position: relative">
              <div
                class="box-show flex justify-between items-center w-full h-76 rounded-lg textColor"
@@ -221,41 +221,7 @@
            :initFutrue="initFutrue"
            @paraId="onParaId"
          />
          <div
            class="h-76 lh-76 mb-30 flex pr-20 justify-center rounded-lg newcolor1 box-show"
            v-if="selectIndex == 1"
          >
            <input
              placeholder=""
              class="w-full pl-20 h-76 border-none text-left rounded-lg"
              :disabled="type / 1 === 1"
              @focus="focus = true"
              v-model="form.price"
            />
            <span class="ml-20">USDT</span>
          </div>
          <!-- <div
            class="h-76 lh-76 inputBackground mb-30 flex pr-20 justify-center rounded-lg textColor"
            v-if="selectIndex == 1"
          >
            <input
              :placeholder="selectIndex == 1 ? $t('请输入止盈金额') : ''"
              class="inputBackground pl-20 h-76 border-none text-left rounded-lg"
              v-model="form.stop_price_profit"
            />
            <span class="font-22 font-400 textColor">{{ $t("止盈") }}</span>
          </div> -->
          <!-- <div
            class="h-76 lh-76 inputBackground mb-30 flex pr-20 justify-center rounded-lg textColor"
            v-if="selectIndex == 1"
          >
            <input
              :placeholder="selectIndex == 1 ? $t('请输入止损金额') : ''"
              class="inputBackground pl-20 h-76 border-none text-left rounded-lg"
              v-model="form.stop_price_loss"
            />
            <span class="font-22 font-400 textColor">{{ $t("止损") }}</span>
          </div> -->
          <div class="w-440 flex items-center box-show h-76 lh-76 rounded-lg">
            <div
              v-if="selectIndex == 1"
@@ -278,7 +244,7 @@
                  ? $t('最小金额') + initFutrue.para[paraIndex].buy_min
                  : ''
              "
              class="border-none text-center newcolor1"
              class="border-none text-center "
              style="width: 156px"
              v-model="form.amount"
              type="number"
@@ -312,6 +278,31 @@
                {{ $t("张") }}
              </span>
            </div>
         <!-- <div
           class="h-76 lh-76 inputBackground mb-30 flex pr-20 justify-center rounded-lg textColor" style="margin-top:20px"
         >
          <input
             :placeholder="selectIndex == 1 ? $t('请输入止盈金额') : ''"
             class="inputBackground pl-20 h-76 border-none text-left rounded-lg"
             v-model="form.stop_price_profit"
           />
           <span class="font-22 font-400 textColor">{{ $t("止盈") }}</span>
         </div>
         <div
           class="h-76 lh-76 inputBackground mb-30 flex pr-20 justify-center rounded-lg textColor" style="margin-bottom:20px"
           v-if="selectIndex == 1"
         >
           <input
             :placeholder="selectIndex == 1 ? $t('请输入止损金额') : ''"
             class="inputBackground pl-20 h-76 border-none text-left rounded-lg"
             v-model="form.stop_price_loss"
           />
           <span class="font-22 font-400 textColor">{{ $t("止损") }}</span>
         </div> -->
         <!-- <div class="btn" style="width: 100%;display: flex;justify-content: center;align-items: center;">
                   <div class="btn_right" style="width: 50%;text-align: center;height: 100%;display: flex;justify-content: center;align-items: center;">{{$t('取消')}}</div>
                   <div class="btn_left" @click="iszyzs=false" style="width: 50%;text-align: center;height: 100%;display: flex;justify-content: center;align-items: center;">{{$t('确认')}}</div>
         </div> -->
            <!-- <vue-slider v-bind="options" v-model="form.amount"></vue-slider> -->
            <!-- <vue-slider class="mainBox" v-bind="options" :marks="marks" v-model="form.volume" :hide-label="true"  width="90%"
              :railStyle="{ background: '#404040', height: '4px' }"
@@ -335,6 +326,10 @@
            ></amount-slider>
          </template>
          <template v-if="selectIndex == 1 && userInfo.token">
           <div class="flex justify-between mt-30">
             <div class="newcolor1">{{ $t("可用USDT") }}</div>
             <div class="textColor">{{ initFutrue.amount | nan }} USDT</div>
           </div>
            <div class="flex justify-between mt-30">
              <div class="newcolor1">{{ $t("合约金额") }}</div>
              <div class="textColor">
@@ -387,7 +382,6 @@
            <template v-if="selectIndex == 1">
              <div
                class="w-full h-80 lh-80 bg-green flex text-white rounded-md mt-50"
                v-if="currentType == 'long'"
                @click="order('long')"
              >
                <div
@@ -408,9 +402,8 @@
                  {{ $t("做多买入") }}
                </div>
              </div>
              <!-- <div
              <div
                class="w-full h-80 lh-80 bg-red flex text-white rounded-md mt-50"
                v-if="currentType == 'short'"
                @click="order('short')"
              >
                <div
@@ -427,7 +420,7 @@
                >
                  {{ $t("做空买入") }}
                </div>
              </div> -->
              </div>
            </template>
            <template v-if="selectIndex == 2">
              <div
@@ -437,12 +430,12 @@
              >
                <div class="font-34 relative text-center" style="flex-grow: 1">
                  {{ $t("开多") }}
                  <span class="right-word font-22 text-center">{{
                <!--  <span class="right-word font-22 text-center">{{
                    $t("看涨")
                  }}</span>
                  }}</span> -->
                </div>
              </div>
              <!-- <div
              <div
                class="w-full h-80 lh-80 bg-red flex text-white rounded-md mt-20 mb-10"
                style="position: relative"
                :class="{ 'mt-22': selectIndex == 2 }"
@@ -451,11 +444,11 @@
              >
                <div class="relative font-34 text-center" style="flex-grow: 1">
                  {{ $t("开空") }}
                  <span class="right-word font-22 text-center">{{
                  <!-- <span class="right-word font-22 text-center">{{
                    $t("看跌")
                  }}</span>
                  }}</span> -->
                </div>
              </div> -->
              </div>
            </template>
          </template>
          <div v-else class="w-full mt-120">
@@ -473,6 +466,7 @@
        </div>
      </div>
    </div>
    <van-popup v-model="show" class="rounded-2xl">
      <popup-delivery
        showBtns
@@ -667,6 +661,7 @@
      theme: "home/theme",
    }),
    initData() {
      let obj = null;
      if (this.selectIndex / 1 === 1) {
        obj = this.initOpen;
@@ -702,6 +697,7 @@
      value: 0,
      isShow: false,
      title: this.$t("市价"),
     iszyzs:false,
      paraIndex: 0,
      selectData: [
        { title: this.$t("市价"), type: "1" },