From d92894f0eacd9388af584cb309bd9355666ea2f3 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 15 Sep 2025 16:03:14 +0800
Subject: [PATCH] 1

---
 src/page/user/myOrder.vue |  163 +++++++++++++++++++++++------------------------------
 1 files changed, 71 insertions(+), 92 deletions(-)

diff --git a/src/page/user/myOrder.vue b/src/page/user/myOrder.vue
index e3bc967..3dd0835 100644
--- a/src/page/user/myOrder.vue
+++ b/src/page/user/myOrder.vue
@@ -10,18 +10,13 @@
               {{ $t("浮動盈虧") }}
               <van-icon name="eye-o" />
             </div>
-            <div
-              class="price"
-              :style="
-                `color:${
-                  moneyData.profitAndLoss > 0
-                    ? 'red'
-                    : moneyData.profitAndLoss < 0
-                    ? 'green'
-                    : ''
-                }`
-              "
-            >
+            <div class="price" :style="`color:${moneyData.profitAndLoss > 0
+              ? 'red'
+              : moneyData.profitAndLoss < 0
+                ? 'green'
+                : ''
+              }`
+              ">
               {{ moneyData.symbol }} {{ moneyData.profitAndLoss }}
             </div>
           </div>
@@ -49,24 +44,15 @@
           </div>
         </div>
         <div class="control flex-between">
-          <div
-            class="control-item flex-center"
-            @click="$router.push('/markets-list')"
-          >
+          <div class="control-item flex-center" @click="$router.push('/markets-list')">
             <img src="@/assets/img/mr.png" />
             <div class="action-item-text">{{ $t("gm") }}</div>
           </div>
-          <div
-            class="control-item flex-center"
-            @click="$router.push('/markets-list')"
-          >
+          <div class="control-item flex-center" @click="$router.push('/markets-list')">
             <img src="@/assets/img/mc.png" />
             <div class="action-item-text">{{ $t("hj78") }}</div>
           </div>
-          <div
-            class="control-item flex-center"
-            @click="$router.push('/Record')"
-          >
+          <div class="control-item flex-center" @click="$router.push('/Record')">
             <img src="@/assets/img/pc.png" />
             <div class="action-item-text">{{ $t("jl") }}</div>
           </div>
@@ -75,25 +61,12 @@
     </div>
 
     <van-tabs v-model="active" title-inactive-color="#898a8e">
-      <van-tab
-        :title="$t('hj2')"
-        name="0"
-        title-style="font-size:0.4rem;"
-      ></van-tab>
-      <van-tab
-        :title="$t('hj121')"
-        name="1"
-        title-style="font-size:0.4rem;"
-      ></van-tab>
+      <van-tab :title="$t('hj2')" name="0" title-style="font-size:0.4rem;"></van-tab>
+      <van-tab :title="$t('hj121')" name="1" title-style="font-size:0.4rem;"></van-tab>
     </van-tabs>
 
     <div class="mo_list" v-if="active == '0'">
-      <div
-        class="mol_item"
-        v-for="(i, index) in list"
-        :key="i.id"
-        @click="open(i, index)"
-      >
+      <div class="mol_item" v-for="(i, index) in list" :key="i.id" @click="open(i, index)">
         <div class="moli_title flex-between">
           <div>
             {{ i.stockSpell }}
@@ -167,9 +140,7 @@
           </div>
 
           <div class="tui-wrapItem" style="width: 22%;">
-            <div
-              style="font-size: 0.28rem;margin-bottom: .25rem;text-align: center;"
-            >
+            <div style="font-size: 0.28rem;margin-bottom: .25rem;text-align: center;">
               {{ $t("持股") }}/{{ $t("可卖") }}
             </div>
             <div style="font-size: .4rem;text-align: center;">
@@ -181,9 +152,7 @@
           </div>
 
           <div class="tui-wrapItem" style="width: 25%;">
-            <div
-              style="font-size: 0.28rem;margin-bottom: .25rem;text-align: end;"
-            >
+            <div style="font-size: 0.28rem;margin-bottom: .25rem;text-align: end;">
               {{ $t("Current") }}/{{ $t("Cost") }}
             </div>
             <div style="font-size: .4rem;text-align: end;">
@@ -195,37 +164,25 @@
           </div>
 
           <div class="tui-wrapItem" style="width: 28%;">
-            <div
-              style="font-size: 0.28rem;margin-bottom: .25rem;text-align: end;"
-            >
+            <div style="font-size: 0.28rem;margin-bottom: .25rem;text-align: end;">
               {{ $t("盈虧") }}/{{ $t("hj141") }}
             </div>
-            <div
-              style="font-size: .4rem;text-align: end;"
-              :style="
-                `color:${
-                  i.profitAndLose < 0
-                    ? 'green'
-                    : i.profitAndLose > 0
-                    ? 'red'
-                    : ''
-                }`
-              "
-            >
+            <div style="font-size: .4rem;text-align: end;" :style="`color:${i.profitAndLose < 0
+              ? 'green'
+              : i.profitAndLose > 0
+                ? 'red'
+                : ''
+              }`
+              ">
               {{ i.profitAndLose }}
             </div>
-            <div
-              style="font-size: .28rem;text-align: end;"
-              :style="
-                `color:${
-                  i.profitAndLose < 0
-                    ? 'green'
-                    : i.profitAndLose > 0
-                    ? 'red'
-                    : ''
-                }`
-              "
-            >
+            <div style="font-size: .28rem;text-align: end;" :style="`color:${i.profitAndLose < 0
+              ? 'green'
+              : i.profitAndLose > 0
+                ? 'red'
+                : ''
+              }`
+              ">
               {{ i.profitAndLoseParent }}
             </div>
           </div>
@@ -253,12 +210,7 @@
     </div>
 
     <div class="mo_list" v-if="active == '1'">
-      <div
-        class="mol_item"
-        v-for="(i, index) in list2"
-        :key="i.id"
-        @click="open(i, index)"
-      >
+      <div class="mol_item" v-for="(i, index) in list2" :key="i.id" @click="open(i, index)">
         <div class="moli_title flex-between">
           <div>
             {{ i.stockSpell }}
@@ -285,18 +237,13 @@
             <div>
               {{ $t("盈虧") }}
             </div>
-            <div
-              style="margin-left: .25rem;font-size: .4rem;"
-              :style="
-                `color:${
-                  i.profitAndLose > 0
-                    ? 'green'
-                    : i.profitAndLose < 0
-                    ? 'red'
-                    : ''
-                }`
-              "
-            >
+            <div style="margin-left: .25rem;font-size: .4rem;" :style="`color:${i.profitAndLose > 0
+              ? 'green'
+              : i.profitAndLose < 0
+                ? 'red'
+                : ''
+              }`
+              ">
               {{ i.profitAndLose }}
             </div>
           </div>
@@ -347,6 +294,7 @@
 </template>
 
 <script>
+let teimss = null;
 import tabHead from "@/components/tabHead.vue";
 import * as api from "@/axios/api";
 export default {
@@ -383,7 +331,13 @@
     }
   },
   created() {
-    if (!this.Operation) this.getMoney();
+    this.getMoney();
+    teimss = setInterval(() => {
+      this.getMoney();
+    }, 10000);
+  },
+  beforeDestroy() {
+    clearInterval(teimss);
   },
   methods: {
     // 获取 持仓 数据
@@ -444,38 +398,47 @@
 <style lang="less" scoped>
 /deep/ .van-tabs__nav {
   background: none;
+
   .van-tab__text--ellipsis {
     overflow: visible;
   }
+
   .van-tab--active {
     color: #ccc !important;
   }
 }
+
 /deep/ .van-tabs__line {
   background-color: rgb(82, 91, 173);
 }
+
 .my_order {
   width: 100%;
   font-size: 0.3rem;
   background-color: rgba(#000, 0.9);
+
   .tui-money {
     margin-top: 0.65rem;
     margin-bottom: 0.3rem;
     width: 100%;
     background: linear-gradient(90deg, #585fb4, #48529e);
     border-radius: 0.175rem;
+
     .control {
       width: 100%;
       padding: 0.2rem 0.3rem;
+
       .control-item {
         width: 33%;
         padding-top: 0.1rem;
         flex-direction: column;
+
         .action-item-text {
           font-size: 0.3rem;
           line-height: 0.3rem;
           color: #aaa;
         }
+
         img {
           width: 0.5rem;
           height: 0.5rem;
@@ -483,30 +446,36 @@
         }
       }
     }
+
     .all-assets {
       width: 100%;
       padding: 0.225rem 0.3rem 0.35rem;
       justify-content: space-evenly;
       border-bottom: #aaa solid 1px;
+
       .assets-item {
         width: 33%;
         flex-shrink: 0;
         flex-direction: column;
+
         .big-size {
           font-size: 0.35rem;
           color: #fff;
           padding-top: 0.15rem;
         }
+
         .all-size {
           font-size: 0.35rem;
           color: #c4c7e4;
         }
       }
     }
+
     .normal {
       padding: 0.375rem 0;
       margin: 0 0.375rem;
       position: relative;
+
       .price {
         font-size: 0.825rem;
         line-height: 0.825rem;
@@ -514,6 +483,7 @@
         padding-top: 0.3rem;
         color: #fff;
       }
+
       .text-xs {
         font-size: 0.45rem;
         color: #c7c9e6;
@@ -521,27 +491,33 @@
       }
     }
   }
+
   .mo_list {
     padding: 0 0.35rem;
+
     .mol_item {
       margin: 0 0 0.3rem;
       background-color: #13161e;
       border-radius: 0.325rem;
       color: #898a8e;
       margin-top: 0.3rem;
+
       .jiaoyi-action {
         width: 100%;
         height: 1.5rem;
         background-color: #191d27;
+
         .action-item {
           width: 33%;
           flex-shrink: 0;
           flex-direction: column;
+
           .action-item-text {
             font-size: 0.3rem;
             line-height: 0.3rem;
             color: #898a8e;
           }
+
           img {
             width: 0.5rem;
             height: 0.5rem;
@@ -549,16 +525,19 @@
           }
         }
       }
+
       .tui-wrapItem {
         padding: 0.175rem 0rem 0;
         color: #898a8e;
         width: 54%;
         line-height: 0.4rem;
       }
+
       .moli_orderTitle {
         padding: 0.3rem 0.3rem 0;
         color: #ccc;
       }
+
       .moli_title {
         padding: 0.3rem;
         border-bottom: 1px solid #494949;

--
Gitblit v1.9.3