From d5381ec06ab5f549fade867c3a874de613bdd5d4 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Fri, 07 Jun 2024 10:23:41 +0800
Subject: [PATCH] 去掉BNB充值,调试好充值接口

---
 src/components/perpetual-open/index.vue |   84 +++++++++++++++++++++++++++--------------
 1 files changed, 55 insertions(+), 29 deletions(-)

diff --git a/src/components/perpetual-open/index.vue b/src/components/perpetual-open/index.vue
index 3b18666..62ff15f 100644
--- a/src/components/perpetual-open/index.vue
+++ b/src/components/perpetual-open/index.vue
@@ -2,20 +2,42 @@
   <!-- 永续合约开仓页 -->
   <div class="perpetual-open">
     <!-- 隐藏杠杠   全仓     k 线图入口 -->
-    <!-- <div class="flex header-open">
+    <div class="flex header-open">
       <div class="flex flex-1 pt-34">
-        <div class="w-180 h-60 lh-60 text-center rounded inputBackground textColor">
+        <div
+          class="w-180 h-60 lh-60 text-center rounded inputBackground textColor"
+        >
           {{ $t("全仓") }}
         </div>
-        <div class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor" v-if="selectIndex / 1 === 1">
-          <div @click="showOptions = !showOptions" style="height: 100%; box-sizing: border-box"
-            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center">
+        <div
+          class="w-140 h-60 lh-60 ml-29 rounded tabBackground textColor"
+          v-if="selectIndex / 1 === 1"
+        >
+          <div
+            @click="showOptions = !showOptions"
+            style="height: 100%; box-sizing: border-box"
+            class="relative word-30 pl-28 pr-10 w-140 h-60 select-wrap flex justify-between items-center"
+          >
             {{ form.lever_rate }}x
-            <img src="../../assets/image/public/grey-select.png" alt="select-icon" class="w-22 h-11" />
-            <div v-if="showOptions" class="options w-140 absolute top-97 left-0 z-10">
-              <div class="w-full" @click.stop="handleChoose(item)" :class="{
-                'option-active': form.lever_rate === item.lever_rate,
-              }" :value="item.lever_rate" v-for="item in initData.lever" :key="item.id">
+            <img
+              src="../../assets/image/public/grey-select.png"
+              alt="select-icon"
+              class="w-22 h-11"
+            />
+            <div
+              v-if="showOptions"
+              class="options w-140 absolute top-97 left-0 z-10"
+            >
+              <div
+                class="w-full"
+                @click.stop="handleChoose(item)"
+                :class="{
+                  'option-active': form.lever_rate === item.lever_rate,
+                }"
+                :value="item.lever_rate"
+                v-for="item in initData.lever"
+                :key="item.id"
+              >
                 {{ item.lever_rate }}x
               </div>
             </div>
@@ -23,9 +45,15 @@
         </div>
       </div>
       <div>
-        <img src="../../assets/image/public/k-line.png" alt="line-img" class="w-38 h-35" @click="jump" />
+        <span @click="jump">
+          <img
+            src="../../assets/image/public/k-line.png"
+            alt="line-img"
+            class="w-38 h-35"
+          />
+        </span>
       </div>
-    </div> -->
+    </div>
     <div class="pt-30 pb-20">
       <div class="flex">
         <div class="mr-30">
@@ -36,7 +64,7 @@
             </div>
             <div class="text-right items-end justify-end">
               <div class="">{{ $t("数量") }}</div>
-              <div class="mt-4">({{ symbol.toUpperCase() || "--" }})</div>
+              <div class="mt-4">({{ symbol | _symbolName() }})</div>
             </div>
           </div>
           <div
@@ -150,13 +178,13 @@
               >
                 {{ $t("开多") }}
               </p>
-              <p
+              <!-- <p
                 class="font-28 flex-1 ml-20 flex items-center justify-center h-66 short"
                 :class="currentType == 'short' ? 'short' : ''"
                 @click="changeTab('short')"
               >
                 {{ $t("开空") }}
-              </p>
+              </p> -->
             </div>
             <div class="mt-30 mb-30" style="position: relative">
               <div
@@ -261,12 +289,13 @@
               style="height: 100%"
             >
               <template v-if="selectIndex == 1">
-                <img
-                  @click="onAdd"
-                  src="../../assets/image/public/add.png"
-                  alt="reduce"
-                  class="w-30 h-30"
-                />
+                <div @click="onAdd">
+                  <img
+                    src="../../assets/image/public/add.png"
+                    alt="reduce"
+                    class="w-30 h-30"
+                  />
+                </div>
               </template>
               <template v-else>
                 <span class="textColor">USDT</span>
@@ -379,7 +408,7 @@
                   {{ $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')"
@@ -390,9 +419,6 @@
                   v-if="selectIndex == 1"
                 >
                   {{ $t("开空") }}
-                  <!-- <span class="right-word font-22 text-center">{{
-                    $t("看跌")
-                  }}</span> -->
                 </div>
                 <div
                   class="relative font-34 text-center"
@@ -401,7 +427,7 @@
                 >
                   {{ $t("做空买入") }}
                 </div>
-              </div>
+              </div> -->
             </template>
             <template v-if="selectIndex == 2">
               <div
@@ -416,7 +442,7 @@
                   }}</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 }"
@@ -429,7 +455,7 @@
                     $t("看跌")
                   }}</span>
                 </div>
-              </div>
+              </div> -->
             </template>
           </template>
           <div v-else class="w-full mt-120">
@@ -559,7 +585,7 @@
         this.form.price = val;
       }
       this.form.para_id =
-        this.initFutrue.para && this.initFutrue.para[this.paraIndex].para_id; // 不优雅,不可靠
+        this.initFutrue.para && this.initFutrue.para[this.paraIndex]?.para_id; // 不优雅,不可靠
       // this.form.symbol = this.symbol.toLowerCase()
     },
     initOpen: {

--
Gitblit v1.9.3