From 3c0afdde84f9dfc7f03404af7dbb8d77c7099ff0 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Fri, 23 May 2025 09:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=20ECharts=20=E5=BA=93=EF=BC=9B?= =?UTF-8?q?=E5=9C=A8=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=E4=B8=AD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=82=A1=E7=A5=A8=E6=8A=A5=E4=BB=B7=E5=92=8C=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=82=A1=E7=A5=A8=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 23 +++++ src/router/index.js | 11 ++- src/store/stock-quote/index.js | 19 ++++ src/views/historic-stock/index.vue | 34 ++++++++ src/views/historic-stock/size1440/index.vue | 22 +++++ src/views/historic-stock/size1920/index.vue | 96 +++++++++++++++++++++ src/views/historic-stock/size375/index.vue | 22 +++++ src/views/historic-stock/size768/index.vue | 22 +++++ src/views/stock-quote/index.vue | 34 ++++++++ src/views/stock-quote/size1440/index.vue | 22 +++++ src/views/stock-quote/size1920/index.vue | 62 +++++++++++++ src/views/stock-quote/size375/index.vue | 22 +++++ src/views/stock-quote/size768/index.vue | 22 +++++ 14 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 src/store/stock-quote/index.js create mode 100644 src/views/historic-stock/index.vue create mode 100644 src/views/historic-stock/size1440/index.vue create mode 100644 src/views/historic-stock/size1920/index.vue create mode 100644 src/views/historic-stock/size375/index.vue create mode 100644 src/views/historic-stock/size768/index.vue create mode 100644 src/views/stock-quote/index.vue create mode 100644 src/views/stock-quote/size1440/index.vue create mode 100644 src/views/stock-quote/size1920/index.vue create mode 100644 src/views/stock-quote/size375/index.vue create mode 100644 src/views/stock-quote/size768/index.vue diff --git a/package.json b/package.json index 591cf5c..a13bc48 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@unocss/reset": "^0.61.9", "axios": "^1.7.3", "cnjm-postcss-px-to-viewport": "^1.0.1", + "echarts": "^5.6.0", "gsap": "^3.12.5", "jsdom": "^24.0.0", "lodash": "^4.17.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a469e2e..4d99557 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: cnjm-postcss-px-to-viewport: specifier: ^1.0.1 version: 1.0.1(postcss@8.4.40) + echarts: + specifier: ^5.6.0 + version: 5.6.0 gsap: specifier: ^3.12.5 version: 3.12.7 @@ -1962,6 +1965,9 @@ packages: duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + echarts@5.6.0: + resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==} + electron-to-chromium@1.5.4: resolution: {integrity: sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==} @@ -3529,6 +3535,9 @@ packages: resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} engines: {node: '>=0.10.0'} + tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} @@ -3820,6 +3829,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zrender@5.6.1: + resolution: {integrity: sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==} + snapshots: '@ampproject/remapping@2.3.0': @@ -5944,6 +5956,11 @@ snapshots: duplexer@0.1.2: {} + echarts@5.6.0: + dependencies: + tslib: 2.3.0 + zrender: 5.6.1 + electron-to-chromium@1.5.4: {} end-of-stream@1.4.4: @@ -7579,6 +7596,8 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + tslib@2.3.0: {} + tslib@2.6.3: {} tsx@4.16.5: @@ -7896,3 +7915,7 @@ snapshots: fd-slicer: 1.1.0 yocto-queue@0.1.0: {} + + zrender@5.6.1: + dependencies: + tslib: 2.3.0 diff --git a/src/router/index.js b/src/router/index.js index b72e60e..dc0b6b4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -17,7 +17,16 @@ const routes = [ // next() // } }, - + { + path: '/stock-quote', + name: 'stock-quote', + component: () => import('@/views/stock-quote/index.vue'), + }, + { + path: '/historic-stock', + name: 'historic-stock', + component: () => import('@/views/historic-stock/index.vue'), + }, { path: '/contacts', name: 'contacts', diff --git a/src/store/stock-quote/index.js b/src/store/stock-quote/index.js new file mode 100644 index 0000000..4ae5b6c --- /dev/null +++ b/src/store/stock-quote/index.js @@ -0,0 +1,19 @@ +import { ref } from 'vue' +import { createGlobalState, useLocalStorage } from '@vueuse/core' +import axios from 'axios' +export const useStockQuote = createGlobalState(() => { + const stockQuote = useLocalStorage('stockQuote', {}) +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?.[20] + stockQuote.value.DayRange=[res.data.nodes?.[2]?.data?.[10],res.data.nodes?.[2]?.data?.[11]] + console.log('stockQuote.value',stockQuote.value); +} + return { + getStockQuate, + stockQuote + } +}) diff --git a/src/views/historic-stock/index.vue b/src/views/historic-stock/index.vue new file mode 100644 index 0000000..cfc4094 --- /dev/null +++ b/src/views/historic-stock/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/historic-stock/size1440/index.vue b/src/views/historic-stock/size1440/index.vue new file mode 100644 index 0000000..427f3d2 --- /dev/null +++ b/src/views/historic-stock/size1440/index.vue @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/views/historic-stock/size1920/index.vue b/src/views/historic-stock/size1920/index.vue new file mode 100644 index 0000000..a1c48ed --- /dev/null +++ b/src/views/historic-stock/size1920/index.vue @@ -0,0 +1,96 @@ + + + + + + diff --git a/src/views/historic-stock/size375/index.vue b/src/views/historic-stock/size375/index.vue new file mode 100644 index 0000000..f3e7467 --- /dev/null +++ b/src/views/historic-stock/size375/index.vue @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/views/historic-stock/size768/index.vue b/src/views/historic-stock/size768/index.vue new file mode 100644 index 0000000..e7c4364 --- /dev/null +++ b/src/views/historic-stock/size768/index.vue @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/views/stock-quote/index.vue b/src/views/stock-quote/index.vue new file mode 100644 index 0000000..cfc4094 --- /dev/null +++ b/src/views/stock-quote/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/stock-quote/size1440/index.vue b/src/views/stock-quote/size1440/index.vue new file mode 100644 index 0000000..427f3d2 --- /dev/null +++ b/src/views/stock-quote/size1440/index.vue @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/views/stock-quote/size1920/index.vue b/src/views/stock-quote/size1920/index.vue new file mode 100644 index 0000000..0a8cc29 --- /dev/null +++ b/src/views/stock-quote/size1920/index.vue @@ -0,0 +1,62 @@ + + + + + \ No newline at end of file diff --git a/src/views/stock-quote/size375/index.vue b/src/views/stock-quote/size375/index.vue new file mode 100644 index 0000000..f3e7467 --- /dev/null +++ b/src/views/stock-quote/size375/index.vue @@ -0,0 +1,22 @@ + + + + + + diff --git a/src/views/stock-quote/size768/index.vue b/src/views/stock-quote/size768/index.vue new file mode 100644 index 0000000..e7c4364 --- /dev/null +++ b/src/views/stock-quote/size768/index.vue @@ -0,0 +1,22 @@ + + + + + +