From 42faef34194c466f03e29d75a63ae502e4213044 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 06 Jan 2026 10:38:46 +0800
Subject: [PATCH] 上一版是10.10的, 这版才是原始源码

---
 src/views/quotes/Detail.vue |   97 ++++++++++++++++++++++++++----------------------
 1 files changed, 52 insertions(+), 45 deletions(-)

diff --git a/src/views/quotes/Detail.vue b/src/views/quotes/Detail.vue
index fa70980..73a439a 100644
--- a/src/views/quotes/Detail.vue
+++ b/src/views/quotes/Detail.vue
@@ -31,7 +31,7 @@
             <span class="red m-4">{{ chartData.netChange ? chartData.netChange : '--' }}</span>
             <span class="red">{{
               chartData?.change_ratio ? `${chartData?.change_ratio}%` : "-"
-              }}</span>
+            }}</span>
           </p>
         </div>
         <div class="flex-r">
@@ -73,7 +73,7 @@
               <span class="label">{{ $t("Change") }}</span>
               <span class="value">{{
                 chartData?.turnoverRate ? formatMoney(chartData?.turnoverRate) + "%" : "-"
-                }}</span>
+              }}</span>
             </p>
             <p class="flex">
               <span class="label">{{ $t("Forehead") }}</span>
@@ -87,7 +87,7 @@
         <span class="time">{{ chartData?.market?.time_str }}</span>&nbsp;
         <span>{{
           chartData?.market?.time_zone && $t(chartData?.market?.time_zone)
-          }}</span>
+        }}</span>
       </p>
       <section class="indicator-index-container">
         <div class="indicator-index-box">
@@ -98,7 +98,7 @@
                 :class="[item.index === timeLabelActive ? 'active' : '']">
                 {{ item.name }}
               </li>
-              <!-- <li @click="handleClickMoreBtn">{{ t("更多") }}</li> -->
+              <li @click="handleClickMoreBtn">{{ t("更多") }}</li>
             </ul>
           </div>
           <!-- <div class="flex-r">
@@ -116,8 +116,8 @@
       </section>
       <section class="kline-container flex">
         <div class="chart-index">
-          <fx-kline :height="400" :symbol="symbol" :isShowsolid="true" :chartType="chartType" v-if="symbol"
-            @data="onData" :key="`${symbol}-${timeValue}`" @loading="onLoading" />
+          <fx-kline :height="400" :symbol="symbol" :isShowsolid="true" :chartType="chartType" v-if="symbol" @data="onData"
+            :key="`${symbol}-${timeValue}`" @loading="onLoading" />
         </div>
         <div class="order-book-container" v-if="timeLabelActive === 0">
           <keep-alive>
@@ -193,7 +193,7 @@
               class="flex justify-between mt-30">
               <span class="flex-1">{{
                 item.current_time ? item.current_time : "--"
-                }}</span>
+              }}</span>
               <span :class="item.direction === 'buy' ? 'text-green' : 'text-red'" class="flex-1">{{ item.direction ===
                 "buy" ? $t("买入") : $t("卖出") }}</span>
               <span :class="item.direction === 'buy' ? 'text-green' : 'text-red'" class="flex-1 flex-justify-center">{{
@@ -359,35 +359,51 @@
 }
 const filterOne = ref([
   { name: t("分时"), paramsValue: "timeSharing", seconds: 1 * 60 * 1000, index: 0 },
-
-  { name: "1" + t("分"), paramsValue: "1day", seconds: 1 * 60 * 1000, index: 12 },
-  { name: "15" + t("分"), paramsValue: "1week", seconds: 15 * 60 * 1000, index: 10 },
-  { name: "30" + t("分"), paramsValue: "1mon", seconds: 30 * 60 * 1000, index: 9 },
-  { name: "120" + t("分"), paramsValue: "1quarter", seconds: 2 * 60 * 60 * 1000, index: 7 },
-
   {
     name: "1" + t("天"),
-    paramsValue: "1year",
+    paramsValue: "1day",
     seconds: 1 * 24 * 60 * 60 * 1000,
     index: 1,
   },
-
-  // { name: t('分时'), paramsValue: 'timeSharing', seconds: 1 * 60 * 1000, index: 0, },
-  // { name: '1' + t('天'), paramsValue: '1day', seconds: 1 * 24 * 60 * 60 * 1000, index: 1, },
-  // { name: '1' + t('周'), paramsValue: '1week', seconds: 7 * 24 * 60 * 60 * 1000, index: 2, },
-  // { name: '1' + t('月'), paramsValue: '1mon', seconds: 30 * 24 * 60 * 60 * 1000, index: 3, },
-  // { name: '5' + t('天'), paramsValue: '5day', seconds: 5 * 24 * 60 * 60 * 1000, index: 4, },
-  // { name: t('season'), paramsValue: '1quarter', seconds: 3 * 30 * 24 * 60 * 60 * 1000, index: 5, },
-  // { name: t('Year'), paramsValue: '1year', seconds: 12 * 30 * 24 * 60 * 60 * 1000, index: 6, },
+  {
+    name: "1" + t("周"),
+    paramsValue: "1week",
+    seconds: 7 * 24 * 60 * 60 * 1000,
+    index: 2,
+  },
+  {
+    name: "1" + t("月"),
+    paramsValue: "1mon",
+    seconds: 30 * 24 * 60 * 60 * 1000,
+    index: 3,
+  },
+  {
+    name: "5" + t("天"),
+    paramsValue: "5day",
+    seconds: 5 * 24 * 60 * 60 * 1000,
+    index: 4,
+  },
+  {
+    name: t("season"),
+    paramsValue: "1quarter",
+    seconds: 3 * 30 * 24 * 60 * 60 * 1000,
+    index: 5,
+  },
+  {
+    name: t("Year"),
+    paramsValue: "1year",
+    seconds: 12 * 30 * 24 * 60 * 60 * 1000,
+    index: 6,
+  },
 ]);
 
 const filterTwo = ref([
-  { name: '120' + t('分'), paramsValue: '120min', seconds: 2 * 60 * 60 * 1000, index: 7, },
-  { name: '60' + t('分'), paramsValue: '60min', seconds: 1 * 60 * 60 * 1000, index: 8, },
-  { name: '30' + t('分'), paramsValue: '30min', seconds: 30 * 60 * 1000, index: 9, },
-  { name: '15' + t('分'), paramsValue: '15min', seconds: 15 * 60 * 1000, index: 10, },
-  { name: '5' + t('分'), paramsValue: '5min', seconds: 5 * 60 * 1000, index: 11, },
-  { name: '1' + t('分'), paramsValue: '1min', seconds: 1 * 60 * 1000, index: 12, },
+  { name: "120" + t("分"), paramsValue: "120min", seconds: 2 * 60 * 60 * 1000, index: 7 },
+  { name: "60" + t("分"), paramsValue: "60min", seconds: 1 * 60 * 60 * 1000, index: 8 },
+  { name: "30" + t("分"), paramsValue: "30min", seconds: 30 * 60 * 1000, index: 9 },
+  { name: "15" + t("分"), paramsValue: "15min", seconds: 15 * 60 * 1000, index: 10 },
+  { name: "5" + t("分"), paramsValue: "5min", seconds: 5 * 60 * 1000, index: 11 },
+  { name: "1" + t("分"), paramsValue: "1min", seconds: 1 * 60 * 1000, index: 12 },
 ]);
 
 const show = ref(false);
@@ -499,22 +515,13 @@
 };
 const startDealsSocket = () => {
   // 交易
-  sockets.value.deals = new WebSocket(`${WS_URL}/3/${symbol.value}`);
+  sockets.value.deals = new WebSocket(`${WS_URL}/2/${symbol.value}`);
   sockets.value.deals.onmessage = (evt) => {
     const { data } = evt;
     const { code, data: _data } = JSON.parse(data);
     // todo: 数据有些问题
     if (code / 1 === 0) {
-      // deals.value = _data.data.slice(0, 17);
-      let asks = _data.asks.map(item => {
-        item.direction = 'sell'
-        return item
-      })
-      let bids = _data.bids.map(item => {
-        item.direction = 'buy'
-        return item
-      })
-      deals.value = [...asks.slice(0, 8), ...bids.slice(0, 9)]
+      deals.value = _data.data.slice(0, 17);
     }
   };
 };
@@ -626,17 +633,17 @@
   if (route.query.from === "trade") {
     router.push(`/trade/index?tabActive=0&navActive=3`);
   } else if (route.query.from === "hot") {
-    if (route.query.category) {
+    if(route.query.category){
       router.push(`/quotes/hotModules?typName=${route.query.typName}&category=${route.query.category}&tabIndex=${route.query.tabIndex}&symbolType=${route.query.symbolType}`);
-    } else {
+    }else{
       router.push(`/quotes/hotModules?typName=${route.query.typName}&tabIndex=${route.query.tabIndex}&symbolType=${route.query.symbolType}`);
     }
-
+   
   } else if (route.query.isOptional == 1) {
     router.push(`/optional/index`);
-  } else if (route.query.tabIndex) {
+  } else if(route.query.tabIndex){
     router.push(`/quotes/index?tabActive=${route.query.tabIndex}&symbolType=${route.query.symbolType}`)
-  } else {
+  }else {
     onRoute("/quotes/index");
   }
 };
@@ -707,7 +714,7 @@
 };
 
 const onLoading = (val) => {
-  console.log(val, 'valsssss')
+  console.log(val,'valsssss')
   isLoading.value = val
 }
 

--
Gitblit v1.9.3