This commit is contained in:
fanfpy 2025-07-21 14:40:11 +08:00
commit c906e9e073
6 changed files with 0 additions and 629 deletions

View File

@ -1,92 +0,0 @@
import axios from 'axios';
import { ElMessage } from 'element-plus';
import jwt from './jwt';
// 创建axios实例
const apiClient = axios.create({
baseURL: process.env.VUE_APP_API_BASE_URL || '/api',
timeout: 10000,
headers: {
'Content-Type': 'application/json'
}
});
// 请求拦截器
apiClient.interceptors.request.use(
(config) => {
// 添加JWT token
const token = jwt.getToken();
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
},
(error) => {
// 请求错误处理
ElMessage.error('请求参数错误: ' + error.message);
return Promise.reject(error);
}
);
// 响应拦截器
apiClient.interceptors.response.use(
(response) => {
// 处理成功响应
return response.data;
},
async (error) => {
// 处理错误响应
const originalRequest = error.config;
// 401未授权且不是刷新token请求
if (error.response?.status === 401 && !originalRequest._retry) {
originalRequest._retry = true;
try {
// 尝试刷新token
const refreshToken = jwt.getRefreshToken();
if (!refreshToken) {
// 无刷新token需要重新登录
jwt.clearTokens();
window.location.href = '/login';
return Promise.reject(error);
}
// 调用刷新token接口
const response = await axios.post('/api/auth/refresh-token', {
refreshToken
});
// 保存新token
const { token, refreshToken: newRefreshToken } = response.data;
jwt.setToken(token);
jwt.setRefreshToken(newRefreshToken);
// 重试原请求
originalRequest.headers.Authorization = `Bearer ${token}`;
return apiClient(originalRequest);
} catch (refreshError) {
// 刷新token失败需要重新登录
jwt.clearTokens();
window.location.href = '/login';
ElMessage.error('登录已过期,请重新登录');
return Promise.reject(refreshError);
}
}
// 其他错误处理
const errorMessage = error.response?.data?.message || '请求失败,请稍后重试';
ElMessage.error(errorMessage);
return Promise.reject(error);
}
);
// 封装常用请求方法
export const api = {
get: (url, params = {}) => apiClient.get(url, { params }),
post: (url, data = {}) => apiClient.post(url, data),
put: (url, data = {}) => apiClient.put(url, data),
delete: (url, params = {}) => apiClient.delete(url, { params }),
patch: (url, data = {}) => apiClient.patch(url, data)
};
export default apiClient;

View File

@ -1,12 +0,0 @@
<template>
<div class="p-6">
<h1 class="text-2xl font-bold text-white mb-6">收益预测</h1>
<!-- 收益预测内容将在后续开发中添加 -->
</div>
</template>
<script>
export default {
name: 'EarningsPrediction'
}
</script>

View File

@ -1,12 +0,0 @@
<template>
<div class="p-6">
<h1 class="text-2xl font-bold text-white mb-6">历史记录</h1>
<!-- 历史记录内容将在后续开发中添加 -->
</div>
</template>
<script>
export default {
name: 'History'
}
</script>

View File

@ -1,12 +0,0 @@
<template>
<div class="p-6">
<h1 class="text-2xl font-bold text-white mb-6">股票市场</h1>
<!-- 股票市场内容将在后续开发中添加 -->
</div>
</template>
<script>
export default {
name: 'StockMarket'
}
</script>

View File

@ -1,12 +0,0 @@
<template>
<div class="p-6">
<h1 class="text-2xl font-bold text-white mb-6">交易新闻</h1>
<!-- 交易新闻内容将在后续开发中添加 -->
</div>
</template>
<script>
export default {
name: 'TradingNews'
}
</script>

View File

@ -1,489 +0,0 @@
<template>
<div class="min-h-screen bg-gray-900 text-white">
<!-- 英雄区域 -->
<section class="relative py-20 overflow-hidden">
<div class="absolute inset-0 bg-[radial-gradient(circle_at_top_right,_rgba(79,70,229,0.15),_transparent_70%)]"></div>
<div class="container mx-auto px-4 relative z-10">
<div class="max-w-3xl mx-auto text-center">
<div class="inline-block px-3 py-1 rounded-full bg-gray-800 text-green-400 mb-6">
由AI驱动的智能投资平台
</div>
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6 leading-tight">
The Most Powerful AI Platform for <span class="text-transparent bg-clip-text bg-gradient-to-r from-green-400 to-blue-500">Smarter Investment</span>
</h1>
<p class="text-xl mb-10 max-w-2xl mx-auto text-gray-400">
利用人工智能技术分析市场趋势提供精准选股建议帮助投资者做出更明智的决策
</p>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<button class="px-8 py-4 rounded-xl bg-gradient-to-r from-green-500 to-blue-600 hover:opacity-90 transition-opacity text-lg font-medium" @click="handleStartUsing">
开始使用
</button>
<button class="px-8 py-4 rounded-xl bg-gray-800 hover:bg-gray-700 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
观看演示
</button>
</div>
</div>
</div>
</section>
<!-- 核心功能模块 -->
<section id="features" class="py-20 bg-gray-900 border-t border-gray-800">
<div class="container mx-auto px-4">
<div class="text-center mb-16">
<div class="inline-block px-3 py-1 rounded-full bg-gray-800 text-blue-400 mb-4">
核心功能
</div>
<h2 class="text-3xl md:text-4xl font-bold mb-6">AI驱动的智能股票分析与投资决策平台</h2>
<p class="text-xl max-w-3xl mx-auto text-gray-400">
集成五大核心功能模块提供全方位的股票数据分析与投资决策支持
</p>
</div>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- 每日股票推荐 -->
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-blue-500/50 transition-all group">
<div class="w-14 h-14 rounded-xl bg-blue-500/20 flex items-center justify-center mb-6 group-hover:bg-blue-500/30 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
</div>
<h3 class="text-xl font-bold mb-3">每日股票推荐</h3>
<p class="text-gray-400 mb-4">
基于机器学习算法每日推送潜力股票推荐列表结合市场趋势与历史数据分析助您把握投资机会
</p>
<ul class="space-y-2 text-sm text-gray-400">
<li class="flex items-center gap-2"><span class="text-green-400"></span> 多因子模型评估</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 风险收益比分析</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 行业分布均衡推荐</li>
</ul>
</div>
<!-- 技术分析 -->
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-green-500/50 transition-all group">
<div class="w-14 h-14 rounded-xl bg-green-500/20 flex items-center justify-center mb-6 group-hover:bg-green-500/30 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-green-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2v-6a2 2 0 00-2-2h-2a2 2 0 00-2 2v6z" />
</svg>
</div>
<h3 class="text-xl font-bold mb-3">技术分析</h3>
<p class="text-gray-400 mb-4">
提供专业级股票技术分析图表支持多种技术指标与周期切换帮助您深入分析股票走势与市场情绪
</p>
<ul class="space-y-2 text-sm text-gray-400">
<li class="flex items-center gap-2"><span class="text-green-400"></span> 实时K线图与指标</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 多周期技术分析</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 技术形态识别</li>
</ul>
</div>
<!-- 用户设置股票 -->
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-purple-500/50 transition-all group">
<div class="w-14 h-14 rounded-xl bg-purple-500/20 flex items-center justify-center mb-6 group-hover:bg-purple-500/30 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-purple-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z" />
</svg>
</div>
<h3 class="text-xl font-bold mb-3">用户设置股票</h3>
<p class="text-gray-400 mb-4">
个性化股票关注列表管理支持添加删除和分组管理关注股票实时追踪您关心的市场动态
</p>
<ul class="space-y-2 text-sm text-gray-400">
<li class="flex items-center gap-2"><span class="text-green-400"></span> 自定义关注列表</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 股票分组管理</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 快速访问与排序</li>
</ul>
</div>
<!-- 添加指标 -->
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-yellow-500/50 transition-all group">
<div class="w-14 h-14 rounded-xl bg-yellow-500/20 flex items-center justify-center mb-6 group-hover:bg-yellow-500/30 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
</div>
<h3 class="text-xl font-bold mb-3">添加指标</h3>
<p class="text-gray-400 mb-4">
灵活的技术指标自定义功能支持添加MACDRSIKDJ等多种技术指标自定义参数与显示样式
</p>
<ul class="space-y-2 text-sm text-gray-400">
<li class="flex items-center gap-2"><span class="text-green-400"></span> 30+技术指标支持</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 自定义指标参数</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 多指标组合分析</li>
</ul>
</div>
<!-- 订阅股票的技术信号提醒 -->
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-red-500/50 transition-all group md:col-span-2 lg:col-span-1">
<div class="w-14 h-14 rounded-xl bg-red-500/20 flex items-center justify-center mb-6 group-hover:bg-red-500/30 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7 text-red-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
</div>
<h3 class="text-xl font-bold mb-3">技术信号提醒</h3>
<p class="text-gray-400 mb-4">
智能技术信号监测系统支持自定义股票信号条件实时推送买卖点提醒不错过任何投资机会
</p>
<ul class="space-y-2 text-sm text-gray-400">
<li class="flex items-center gap-2"><span class="text-green-400"></span> 自定义信号条件</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 实时推送提醒</li>
<li class="flex items-center gap-2"><span class="text-green-400"></span> 历史信号回溯</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Trading Section -->
<section id="trading" class="py-20 bg-gray-900 border-t border-gray-800">
<div class="container mx-auto px-4">
<div class="text-center mb-16">
<div class="inline-block px-3 py-1 rounded-full bg-gray-800 text-green-400 mb-4">
智能交易
</div>
<h2 class="text-3xl md:text-4xl font-bold mb-6">AI-Powered Trading Insights</h2>
<p class="text-xl max-w-3xl mx-auto text-gray-400">
基于多因子模型的交易信号分析助您把握市场机会
</p>
</div>
<div class="grid md:grid-cols-2 gap-8 items-center">
<div class="order-2 md:order-1">
<div class="space-y-6">
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-green-500/50 transition-all">
<h3 class="text-xl font-bold mb-3 flex items-center">
<span class="w-8 h-8 rounded-full bg-green-500/20 flex items-center justify-center mr-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
</span>
交易信号分析
</h3>
<p class="text-gray-400">
AI实时监测市场动态识别买入/卖出信号提供清晰的交易决策建议
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-blue-500/50 transition-all">
<h3 class="text-xl font-bold mb-3 flex items-center">
<span class="w-8 h-8 rounded-full bg-blue-500/20 flex items-center justify-center mr-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
</svg>
</span>
风险控制
</h3>
<p class="text-gray-400">
内置风险评估模型自动计算止损点和仓位建议帮助控制投资风险
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-purple-500/50 transition-all">
<h3 class="text-xl font-bold mb-3 flex items-center">
<span class="w-8 h-8 rounded-full bg-purple-500/20 flex items-center justify-center mr-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-purple-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</span>
交易时段分析
</h3>
<p class="text-gray-400">
分析不同交易时段的市场表现识别最佳交易时机
</p>
</div>
</div>
</div>
<div class="order-1 md:order-2">
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-4">
<div class="aspect-w-16 aspect-h-9 bg-gray-900 rounded-xl overflow-hidden">
<div id="trading-signal-chart" class="w-full h-full"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Insights Section -->
<section id="insights" class="py-20 bg-gray-900 border-t border-gray-800">
<div class="container mx-auto px-4">
<div class="text-center mb-16">
<div class="inline-block px-3 py-1 rounded-full bg-gray-800 text-blue-400 mb-4">
市场洞察
</div>
<h2 class="text-3xl md:text-4xl font-bold mb-6">AI 驱动的市场洞察</h2>
<p class="text-xl max-w-3xl mx-auto text-gray-400">
结合技术因子与情绪分析提供全面的市场洞察
</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-blue-500/50 transition-all">
<div class="h-64 mb-6 bg-gray-900 rounded-xl flex items-center justify-center">
<div id="sentiment-chart" class="w-full h-full"></div>
</div>
<h3 class="text-xl font-bold mb-3">市场情绪分析</h3>
<p class="text-gray-400">
基于自然语言处理技术分析金融新闻与社交媒体情绪把握市场情绪走向
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-green-50/50 transition-all">
<div class="h-64 mb-6 bg-gray-900 rounded-xl flex items-center justify-center">
<div id="factor-chart" class="w-full h-full"></div>
</div>
<h3 class="text-xl font-bold mb-3">因子权重分析</h3>
<p class="text-gray-400">
可视化展示各因子对股票推荐的影响权重提供透明的推荐解释
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-purple-500/50 transition-all">
<div class="h-64 mb-6 bg-gray-900 rounded-xl flex items-center justify-center">
<div id="sector-chart" class="w-full h-full"></div>
</div>
<h3 class="text-xl font-bold mb-3">行业表现分析</h3>
<p class="text-gray-400">
分析不同行业板块的表现与趋势帮助您把握行业轮动机会
</p>
</div>
</div>
</div>
</section>
<!-- User Reviews Section -->
<section id="testimonials" class="py-20 bg-gray-900 border-t border-gray-800">
<div class="container mx-auto px-auto">
<div class="text-center mb-16">
<div class="inline-block px-3 py-1 rounded-full bg-gray-800 text-yellow-400 mb-4">
用户评价
</div>
<h2 class="text-3xl md:text-4xl font-bold mb-6">投资者的真实反馈</h2>
<p class="text-xl max-w-3xl mx-auto text-gray-400">
听听其他投资者如何使用我们的平台提升投资决策
</p>
</div>
<div class="grid md:grid-cols-3 gap-8">
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-yellow-500/50 transition-all">
<div class="flex items-center mb-4">
<img src="/images/user1.jpg" alt="用户头像" class="w-12 h-12 rounded-full mr-4" />
<div>
<h4 class="font-bold">张晓明</h4>
<div class="flex text-yellow-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</div>
</div>
</div>
<p class="text-gray-400 mb-4">
"使用这个平台三个月我的投资收益提高了35%。AI推荐的股票组合非常精准市场情绪分析功能帮助我避开了几次大跌。"
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-yellow-500/50 transition-all">
<div class="flex items-center mb-4">
<img src="/images/user2.jpg" alt="用户头像" class="w-12 h-12 rounded-full mr-4" />
<div>
<h4 class="font-bold">李静</h4>
<div class="flex text-yellow-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</div>
</div>
</div>
<p class="text-gray-400 mb-4">
"作为一名投资新手这个平台的AI助手功能帮了我大忙。它不仅解释复杂的市场指标还提供个性化的学习路径让我在两个月内从零基础成长为能够独立做出投资决策。"
</p>
</div>
<div class="bg-gray-800/50 border border-gray-800 rounded-2xl p-6 hover:border-yellow-500/50 transition-all">
<div class="flex items-center mb-4">
<img src="/images/user3.jpg" alt="用户头像" class="w-12 h-12 rounded-full mr-4" />
<div>
<h4 class="font-bold">王建国</h4>
<div class="flex text-yellow-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</div>
</div>
</div>
<p class="text-gray-400 mb-4">
"我是一名有十年经验的投资者,这个平台的量化分析工具让我的研究效率提升了数倍。多因子模型回测功能非常强大,帮助我验证了多个投资策略的有效性。"
</p>
</div>
</div>
</div>
</section>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
mounted() {
//
const tradingChart = echarts.init(document.getElementById('trading-signal-chart'));
//
const option = {
title: { text: '交易信号分析', left: 'center', textStyle: { color: '#fff' } },
tooltip: { trigger: 'axis' },
legend: { data: ['价格', '买入信号', '卖出信号'], textStyle: { color: '#ccc' } },
grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月'],
axisLine: { lineStyle: { color: '#666' } },
axisLabel: { color: '#ccc' }
},
yAxis: {
type: 'value',
axisLine: { lineStyle: { color: '#666' } },
axisLabel: { color: '#ccc' },
splitLine: { lineStyle: { color: '#333' } }
},
series: [
{
name: '价格',
type: 'line',
data: [120, 190, 130, 230, 210, 320],
smooth: true,
lineStyle: { color: '#409EFF' },
itemStyle: { color: '#409EFF' }
},
{
name: '买入信号',
type: 'scatter',
data: [[1, 150], [3, 160], [5, 280]],
symbolSize: 15,
itemStyle: { color: '#52c41a' }
},
{
name: '卖出信号',
type: 'scatter',
data: [[2, 210], [4, 250]],
symbolSize: 15,
itemStyle: { color: '#f5222d' }
}
]
};
tradingChart.setOption(option);
//
window.addEventListener('resize', () => tradingChart.resize());
// mounted
this.initOtherComponents();
},
name: 'Index',
mounted() {
this.initCharts();
},
methods: {
handleStartUsing() {
//
const isLoggedIn = localStorage.getItem('isLoggedIn') === 'true';
if (isLoggedIn) {
this.$router.push('/app');
} else {
this.$router.push('/sign-up');
}
},
initCharts() {
//
const sentimentChart = echarts.init(document.getElementById('sentiment-chart'));
sentimentChart.setOption({
title: { text: '市场情绪趋势' },
tooltip: { trigger: 'axis' },
xAxis: { type: 'category', data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] },
yAxis: { type: 'value', min: -100, max: 100 },
series: [{
data: [30, 40, 35, 50, 49, 60, 70],
type: 'line',
lineStyle: { color: '#4ade80' },
itemStyle: { color: '#4ade80' }
}]
});
//
const factorChart = echarts.init(document.getElementById('factor-chart'));
factorChart.setOption({
title: { text: '因子权重分布' },
tooltip: { trigger: 'item' },
series: [{
type: 'pie',
data: [
{ value: 30, name: '技术指标' },
{ value: 25, name: '市场情绪' },
{ value: 20, name: '基本面' },
{ value: 15, name: '行业趋势' },
{ value: 10, name: '资金流向' }
],
color: ['#4ade80', '#3b82f6', '#8b5cf6', '#f59e0b', '#ef4444']
}]
});
//
const sectorChart = echarts.init(document.getElementById('sector-chart'));
sectorChart.setOption({
title: { text: '行业表现对比' },
tooltip: { trigger: 'axis' },
xAxis: { type: 'category', data: ['科技', '金融', '消费', '医药', '能源'] },
yAxis: { type: 'value' },
series: [{
data: [12, 9, 15, 8, 5],
type: 'bar',
itemStyle: { color: '#3b82f6' }
}]
});
//
window.addEventListener('resize', () => {
sentimentChart.resize();
factorChart.resize();
sectorChart.resize();
});
}
}
}
</script>