From 836a56418f932086e4221cb6c5e6a56f1c0dfecf Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Fri, 22 May 2026 15:07:30 +0800
Subject: [PATCH] 1

---
 src/views/trade/index.vue |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/views/trade/index.vue b/src/views/trade/index.vue
index 9201c55..6bcd312 100644
--- a/src/views/trade/index.vue
+++ b/src/views/trade/index.vue
@@ -1,5 +1,6 @@
 <template>
   <div id="cryptos" class="trade_new">
+    <!-- 顶部导航与选择条已去掉 -->
 
     <!-- <div class="flex justify-start items-center">
       <img src="@/assets/image/icon_back.png" alt="" class="back mr-20" @click="$router.go(-1)">
@@ -15,14 +16,14 @@
     </ContractHeader>
     <!-- <Head :symbolObj="symbolObj"></Head> -->
 
-    <div :key="symbol" class="pb-108 no_touch">
+    <div :key="symbol" class="pb-108 no_touch ">
       <p class="status-info" v-if="chartData.market && chartData.market.status">
         <span>{{ chartData.market.status && $t(chartData.market.status) }},</span>
         <span class="time">{{ chartData.market.time_str }}</span>&nbsp;
         <span>{{ chartData.market.time_zone && $t(chartData.market.time_zone) }}</span>
       </p>
       <div :class="{ slide2: animated1 }" v-if="selectIndex === 1">
-        <section class="value-container" v-if="showMore">
+        <section class="value-container trade-hide-stats" v-if="showMore">
           <div class="flex-l">
             <p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
             <p class="second-line">
@@ -76,21 +77,21 @@
           </div>
         </section>
         <div class=" rounded-view" key="x">
-          <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
+          <PerpetualOpen class="pl-30 pr-30" style="background-color: #fff;border-radius: 20px;" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol"
             :green-data="bids" :red-data="asks" :price="price" :init-open="initOpen" :init-close="initClose"
             :init-futrue="initFutrue" :currentType="currentType" @changeValueBack="changeValueBack"
             @changeCurrentType="changeCurrentType" @ordered="onOrdered">
           </PerpetualOpen>
           <!-- <div class="line"></div> -->
           <!-- 委托/持仓-->
-          <PerpetualOrder class="pl-30 pr-30" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur"
+          <PerpetualOrder class="pl-30 pr-30" style="background-color: #fff;" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur"
             :order-hold="orderHold" :topIndex="selectIndex" :futrue-hold="futrueHold" :futrue-histroy="futrueHistroy"
             @tab="onTab" @recall="onRecall">
           </PerpetualOrder>
         </div>
       </div>
       <div :class="{ slide1: animated2 }" v-else>
-        <section class="value-container" v-if="showMore">
+        <section class="value-container trade-hide-stats" v-if="showMore">
           <div class="flex-l">
             <p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
             <p class="second-line">
@@ -236,6 +237,7 @@
       })
     }
     return {
+      leverRate: 100,
       quote: {},
       initTimer: null,
       keyIndex: 0,
@@ -368,6 +370,10 @@
       this[this.curTab](this.symbol)
       _initOpen({ symbol: this.symbol }).then(data => {
         this.initOpen = data
+      })
+      // 平仓/撤单后刷新永续余额
+      _futrueOrderInit(this.symbol).then(data => {
+        this.initFutrue = data
       })
     },
     handleClickShowMore() {
@@ -541,7 +547,8 @@
           initFun()
         }, 600);
       }
-      if (type === 'futrue' || !type) {
+      // 购买/开仓/平仓后都刷新永续余额 initFutrue.amount
+      if (type === 'futrue' || type === 'close' || type === 'open' || type === 'long' || type === 'short' || !type) {
         _futrueOrderInit(symbol).then(data => {
           console.log(data, '数据9999')
           this.initFutrue = data
@@ -718,11 +725,15 @@
 <style lang="scss" scoped>
 @import "@/assets/init.scss";
 
+.trade-hide-stats.value-container {
+  display: none;
+}
+
 .trade_new {
   color: $log-c;
   background: $mainbgWhiteColor;
   min-height: 100vh;
-  padding: 1.4rem 1.4rem 7rem 1.4rem;
+  // padding: 1.4rem 1.4rem 7rem 1.4rem;
 
   .back {
     width: 2rem;
@@ -752,6 +763,10 @@
 #cryptos {
   background: $mainbgWhiteColor;
   $inp-b: #f7f7f7;
+
+  .trade-content-bg {
+    background: #fff;
+  }
 
   :deep(.textColor) {
     color: $log-c;
@@ -848,6 +863,7 @@
     border-top-left-radius: 20px;
     border-top-right-radius: 20px;
     box-sizing: border-box;
+    background-color: #fff;
   }
 
 
@@ -911,8 +927,6 @@
   .my-swipe {
     width: 100%;
   }
-
-  .my-swipe .van-swipe-item {}
 
   .line {
     height: 13px;

--
Gitblit v1.9.3