From 1976c7d9da7947891757ae9b34e37d02b52b175a Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Fri, 23 May 2025 10:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=82=A1=E7=A5=A8=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=B0=83=E6=95=B4=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E4=BF=A1=E6=81=AF=E5=8A=A8=E6=80=81=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/stock-quote/index.js | 23 ++++++++++++++--------- src/views/index/size1920/index.vue | 6 ++++-- src/views/stock-quote/size1920/index.vue | 23 ++++++++++------------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/store/stock-quote/index.js b/src/store/stock-quote/index.js index d4d514d..b8a423f 100644 --- a/src/store/stock-quote/index.js +++ b/src/store/stock-quote/index.js @@ -1,17 +1,22 @@ import { ref } from 'vue' import { createGlobalState, useLocalStorage } from '@vueuse/core' import axios from 'axios' + export const useStockQuote = createGlobalState(() => { - const stockQuote = useLocalStorage('stockQuote', {}) + const stockQuote = useLocalStorage('stockQuote', { + "Open": "", + "Volume": "", + "DayRange": "", + "WeekRange": "", + "MarketCap": "", + "change": [ + "", + "" + ] + }) const getStockQuate= async()=>{ - const res = await axios.post('http://saas-test.szjixun.cn/api/chart/forward/test') - console.log('res',res); - stockQuote.value.Open=res.data.nodes?.[2]?.data?.[10] - stockQuote.value.Volume=res.data.nodes?.[1]?.data?.[21] - stockQuote.value.DayRange=[res.data.nodes?.[2]?.data?.[10],res.data.nodes?.[2]?.data?.[11]] - stockQuote.value.WeekRange=[res.data.nodes?.[2]?.data?.[31],res.data.nodes?.[1]?.data?.[30]] - - console.log('stockQuote.value',stockQuote.value); + const res = await axios.get('http://localhost:3213/api/minm/open') + stockQuote.value=res.data } return { getStockQuate, diff --git a/src/views/index/size1920/index.vue b/src/views/index/size1920/index.vue index f0298c4..eca403d 100644 --- a/src/views/index/size1920/index.vue +++ b/src/views/index/size1920/index.vue @@ -7,11 +7,13 @@ import customFooter from '@/components/customFooter/index.vue'