From 46fb1e8ff48f2ca41a8a2a32a90693b91fb5f32a Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Mon, 19 May 2025 17:13:14 +0800
Subject: [PATCH] 首页k线修复

---
 src/components/list-quotation/index.vue |   11 +++++++++++
 src/request/httpAxios.js                |    2 +-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/components/list-quotation/index.vue b/src/components/list-quotation/index.vue
index 184fa78..81156d0 100644
--- a/src/components/list-quotation/index.vue
+++ b/src/components/list-quotation/index.vue
@@ -281,6 +281,7 @@
 
       canvasList.forEach((canvas, index) => {
         if (!canvas) return;
+        // if (this.listData[index].kLineData) return;
 
         const ctx = canvas.getContext("2d");
         const width = canvas.width;
@@ -312,6 +313,8 @@
 
         ctx.stroke();
       });
+
+      console.log("listData: ", this.listData);
     },
     //排序
     listSort(val) {
@@ -396,6 +399,14 @@
         this.showList = [...this.listData].sort(this.compare("volume", "up"));
       }
       this.$forceUpdate();
+      this.$nextTick(() => {
+        // 为每一项补充 kLineData
+        this.listData.forEach((item) => {
+          if (!item.kLineData) {
+            item.kLineData = this.generateKLineData();
+          }
+        });
+      });
     },
   },
 };
diff --git a/src/request/httpAxios.js b/src/request/httpAxios.js
index f9121f4..5e4df85 100644
--- a/src/request/httpAxios.js
+++ b/src/request/httpAxios.js
@@ -13,7 +13,7 @@
 // let baseUrl = BASE_URL;
 // let baseUrl = "http://192.168.0.105:18080/wap/";
 // let baseUrl = "https://csjys.gayssad.com/wap/";
-let baseUrl = "https://dapp.web3bit.info/wap/";
+let baseUrl = "https://coin.usadeepcoin.com/wap/";
 
 // 创建
 const request = axios.create({

--
Gitblit v1.9.3