From be144e74f22a6bc2fd436c91248b66582b2b759f Mon Sep 17 00:00:00 2001 From: aaron <> Date: Wed, 14 May 2025 21:58:26 +0800 Subject: [PATCH] update --- src/App.vue | 4 +- src/views/AStockAnalysisView.vue | 199 ++++++++++++++++++++++---- src/views/CryptoAnalysisView.vue | 230 +++++++++++++++++++++++++------ 3 files changed, 365 insertions(+), 68 deletions(-) diff --git a/src/App.vue b/src/App.vue index 519f47d..87972a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -290,7 +290,7 @@ onUnmounted(() => { > - 加密分析 + 加密货币分析 (null) const currentThought = ref('') +const showInitialView = ref(true) // 根据环境选择API基础URL const apiBaseUrl = @@ -30,6 +31,7 @@ const handleAnalysis = async () => { return } + showInitialView.value = false isAnalyzing.value = true analysisContent.value = '' currentThought.value = '准备开始分析...' @@ -123,6 +125,14 @@ const handleAnalysis = async () => { } } +const resetView = () => { + showInitialView.value = true + stockCode.value = '' + analysisContent.value = '' + currentThought.value = '' + isAnalyzing.value = false +} + const clearInput = () => { stockCode.value = '' analysisContent.value = '' @@ -133,8 +143,9 @@ const clearInput = () => {
-
-
+ +
+

A股AI分析专家

通过 AI 技术,获取 A 股上市公司的深度分析报告

@@ -186,26 +197,52 @@ const clearInput = () => {
- -
-
- - - + +
+
+
+ 正在分析: + {{ stockCode }} +
+
-

- AI分析进行中 - {{ currentThought }} -

-
-
-
+
+
+ + + +
+
+
AI分析进行中
+
{{ currentThought }}
+
+
+ +
+
+
@@ -374,8 +411,14 @@ const clearInput = () => { } .analysis-status { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 2rem 1rem; text-align: center; - margin: 1rem 0; + background-color: var(--color-bg-secondary); + border-radius: var(--border-radius); } .progress-dots { @@ -404,23 +447,24 @@ const clearInput = () => { } .status-text { - color: var(--color-text-secondary); - font-size: 1rem; - margin: 0; display: flex; + flex-direction: column; align-items: center; - justify-content: center; - gap: 1rem; + gap: 0.5rem; } .status-label { font-weight: 500; color: var(--color-accent); + font-size: 1.1rem; } .thought-text { font-size: 0.95rem; color: var(--color-text-secondary); + max-width: 600px; + text-align: center; + line-height: 1.5; } .analysis-container { @@ -552,4 +596,107 @@ const clearInput = () => { padding-bottom: 1rem; } } + +.analysis-view { + display: flex; + flex-direction: column; + height: 100vh; + padding: 1rem; + animation: fadeIn 0.3s ease-out; +} + +.analysis-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem; + background-color: var(--color-bg-secondary); + border-radius: var(--border-radius); + margin-bottom: 1rem; +} + +.target-info { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.target-info .label { + color: var(--color-text-secondary); + font-size: 0.95rem; +} + +.target-info .value { + color: var(--color-accent); + font-weight: 500; + font-size: 1.1rem; +} + +.new-analysis-button { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.5rem 1rem; + border: 1px solid var(--color-accent); + border-radius: var(--border-radius); + background: transparent; + color: var(--color-accent); + cursor: pointer; + transition: all 0.2s ease; +} + +.new-analysis-button:hover:not(:disabled) { + background-color: var(--color-accent); + color: white; +} + +.new-analysis-button:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +.new-analysis-button .icon { + width: 16px; + height: 16px; +} + +.analysis-container { + flex: 1; + overflow-y: auto; + background-color: var(--color-bg-primary); + border-radius: var(--border-radius); + margin-top: 1rem; +} + +@media (max-width: 768px) { + .analysis-view { + padding: 0.5rem; + } + + .analysis-header { + padding: 0.75rem; + flex-direction: column; + gap: 0.75rem; + align-items: flex-start; + } + + .new-analysis-button { + width: 100%; + justify-content: center; + } +} + +@media (max-width: 480px) { + .analysis-header { + padding: 0.5rem; + } + + .target-info .label { + font-size: 0.9rem; + } + + .target-info .value { + font-size: 1rem; + } +} diff --git a/src/views/CryptoAnalysisView.vue b/src/views/CryptoAnalysisView.vue index bd87fb1..7022ec1 100644 --- a/src/views/CryptoAnalysisView.vue +++ b/src/views/CryptoAnalysisView.vue @@ -14,6 +14,7 @@ const analysisContent = ref('') const analysisContainer = ref(null) const currentThought = ref('') const selectedTimeframe = ref('all') +const showInitialView = ref(true) const timeframes = [ { label: '全部', value: 'all' }, @@ -45,6 +46,7 @@ const handleKeydown = (event: KeyboardEvent) => { const handleAnalysis = async () => { if (!cryptoCode.value.trim() || isAnalyzing.value) return + showInitialView.value = false isAnalyzing.value = true analysisContent.value = '' currentThought.value = '准备开始分析...' @@ -139,6 +141,14 @@ const handleAnalysis = async () => { } } +const resetView = () => { + showInitialView.value = true + cryptoCode.value = '' + analysisContent.value = '' + currentThought.value = '' + isAnalyzing.value = false +} + // 清除输入 const clearInput = () => { cryptoCode.value = '' @@ -150,8 +160,9 @@ const clearInput = () => {