feat(frontend): 添加Tailwind CSS支持并重构首页UI
- 配置Tailwind CSS及相关PostCSS插件 - 重构App.vue实现响应式布局和暗黑模式切换 - 更新HTML meta标签增强SEO - 添加核心功能展示区块和主题切换功能
This commit is contained in:
parent
ba45989d64
commit
8e87081312
10022
services/frontend/package-lock.json
generated
Normal file
10022
services/frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,14 +8,17 @@
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.3.4",
|
||||
"vue": "^3.2.45",
|
||||
"vue-router": "^4.1.6",
|
||||
"axios": "^1.3.4"
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-service": "~5.0.8",
|
||||
"@vue/compiler-sfc": "^3.2.45",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint-plugin-vue": "^9.9.0"
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"postcss": "^8.4.38",
|
||||
"tailwindcss": "^3.4.1"
|
||||
}
|
||||
}
|
||||
6
services/frontend/postcss.config.js
Normal file
6
services/frontend/postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
@ -4,7 +4,14 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>AriStockAI</title>
|
||||
<meta name="description" content="AriStockAI - AI驱动的智能股票分析与投资决策平台,提供每日股票推荐、技术分析和实时信号提醒,助您把握投资机会。">
|
||||
<meta name="keywords" content="股票分析, AI选股, 投资决策, 技术指标, 股票推荐, 智能投资">
|
||||
<meta property="og:title" content="AriStockAI - 智能股票分析与投资决策平台">
|
||||
<meta property="og:description" content="利用人工智能技术分析市场趋势,提供精准选股建议,帮助投资者做出更明智的决策。">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://aristockai.com">
|
||||
<meta property="og:image" content="https://aristockai.com/og-image.jpg">
|
||||
<title>AriStockAI - AI驱动的智能股票分析与投资决策平台</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
@ -1,23 +1,203 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<h1>AriStockAI</h1>
|
||||
<p>智能选股分析系统</p>
|
||||
</div>
|
||||
</template>
|
||||
<div id="app" :class="[theme === 'dark' ? 'bg-gray-900 text-white' : 'bg-gray-50 text-gray-900', 'min-h-screen flex flex-col']">
|
||||
<!-- 导航栏 -->
|
||||
<header class="sticky top-0 z-50" :class="theme === 'dark' ? 'bg-gray-900/80 backdrop-blur-md border-b border-gray-800' : 'bg-white/80 backdrop-blur-md border-b border-gray-200'">
|
||||
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-green-500 to-blue-600 flex items-center justify-center">
|
||||
<span class="font-bold text-xl">A</span>
|
||||
</div>
|
||||
<span class="font-bold text-xl">AriStockAI</span>
|
||||
</div>
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#features" :class="theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'">功能</a>
|
||||
<a href="#trading" :class="theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'">交易</a>
|
||||
<a href="#insights" :class="theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'">洞察</a>
|
||||
<a href="#testimonials" :class="theme === 'dark' ? 'text-gray-300 hover:text-white' : 'text-gray-600 hover:text-gray-900'">用户评价</a>
|
||||
</nav>
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 主题切换按钮 -->
|
||||
<button @click="toggleTheme" class="p-2 rounded-full" :class="theme === 'dark' ? 'bg-gray-800 hover:bg-gray-700' : 'bg-gray-200 hover:bg-gray-300'">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="hidden md:block px-4 py-2 rounded-lg" :class="theme === 'dark' ? 'border border-gray-700 hover:bg-gray-800' : 'border border-gray-300 hover:bg-gray-100'">登录</button>
|
||||
<button class="px-4 py-2 rounded-lg bg-gradient-to-r from-green-500 to-blue-600 hover:opacity-90 transition-opacity">开始使用</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
<!-- 主页区域 -->
|
||||
<section class="relative py-20 overflow-hidden">
|
||||
<div class="absolute inset-0" :class="theme === 'dark' ? 'bg-[radial-gradient(circle_at_top_right,_rgba(79,70,229,0.15),_transparent_70%)]' : 'bg-[radial-gradient(circle_at_top_right,_rgba(79,70,229,0.05),_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" :class="theme === 'dark' ? 'bg-gray-800 text-green-400' : 'bg-gray-200 text-green-600'">
|
||||
由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" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
利用人工智能技术分析市场趋势,提供精准选股建议,帮助投资者做出更明智的决策
|
||||
</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">
|
||||
免费试用 14 天
|
||||
</button>
|
||||
<button class="px-8 py-4 rounded-xl" :class="theme === 'dark' ? 'bg-gray-800 hover:bg-gray-700' : 'bg-gray-200 hover:bg-gray-300'">
|
||||
<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>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
||||
<!-- 核心功能模块 -->
|
||||
<section id="features" class="py-20" :class="theme === 'dark' ? 'bg-gray-900 border-t border-gray-800' : 'bg-white border-t border-gray-200'">
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="text-center mb-16">
|
||||
<div class="inline-block px-3 py-1 rounded-full" :class="theme === 'dark' ? 'bg-gray-800 text-blue-400' : 'bg-gray-200 text-blue-600'">
|
||||
核心功能
|
||||
</div>
|
||||
<h2 class="text-3xl md:text-4xl font-bold mb-6">AI驱动的智能股票分析与投资决策平台</h2>
|
||||
<p class="text-xl max-w-3xl mx-auto" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
集成五大核心功能模块,提供全方位的股票数据分析与投资决策支持
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<!-- 每日股票推荐 -->
|
||||
<div :class="theme === 'dark' ? 'bg-gray-800/50 border border-gray-800' : 'bg-white border border-gray-200'" class="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="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'" class="mb-4">
|
||||
基于机器学习算法,每日推送潜力股票推荐列表,结合市场趋势与历史数据分析,助您把握投资机会。
|
||||
</p>
|
||||
<ul class="space-y-2 text-sm" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
<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="theme === 'dark' ? 'bg-gray-800/50 border border-gray-800' : 'bg-white border border-gray-200'" class="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="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'" class="mb-4">
|
||||
提供专业级股票技术分析图表,支持多种技术指标与周期切换,帮助您深入分析股票走势与市场情绪。
|
||||
</p>
|
||||
<ul class="space-y-2 text-sm" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
<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="theme === 'dark' ? 'bg-gray-800/50 border border-gray-800' : 'bg-white border border-gray-200'" class="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="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'" class="mb-4">
|
||||
个性化股票关注列表管理,支持添加、删除和分组管理关注股票,实时追踪您关心的市场动态。
|
||||
</p>
|
||||
<ul class="space-y-2 text-sm" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
<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="theme === 'dark' ? 'bg-gray-800/50 border border-gray-800' : 'bg-white border border-gray-200'" class="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="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'" class="mb-4">
|
||||
灵活的技术指标自定义功能,支持添加MACD、RSI、KDJ等多种技术指标,自定义参数与显示样式。
|
||||
</p>
|
||||
<ul class="space-y-2 text-sm" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
<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="theme === 'dark' ? 'bg-gray-800/50 border border-gray-800' : 'bg-white border border-gray-200'" class="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="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'" class="mb-4">
|
||||
智能技术信号监测系统,支持自定义股票信号条件,实时推送买卖点提醒,不错过任何投资机会。
|
||||
</p>
|
||||
<ul class="space-y-2 text-sm" :class="theme === 'dark' ? 'text-gray-400' : 'text-gray-600'">
|
||||
<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>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="mt-auto" :class="theme === 'dark' ? 'bg-gray-900 border-t border-gray-800' : 'bg-white border-t border-gray-200'">
|
||||
<div class="container mx-auto px-4 py-12">
|
||||
<div class="text-center" :class="theme === 'dark' ? 'text-gray-500' : 'text-gray-600'">
|
||||
© 2023 AriStockAI. 保留所有权利。
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
theme: localStorage.getItem('theme') || 'dark'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 应用保存的主题
|
||||
document.documentElement.classList.toggle('dark', this.theme === 'dark');
|
||||
},
|
||||
methods: {
|
||||
toggleTheme() {
|
||||
this.theme = this.theme === 'dark' ? 'light' : 'dark';
|
||||
localStorage.setItem('theme', this.theme);
|
||||
document.documentElement.classList.toggle('dark', this.theme === 'dark');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 移除默认样式,使用Tailwind工具类 */
|
||||
</style>
|
||||
@ -1,3 +1,4 @@
|
||||
import './styles.css'
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
|
||||
3
services/frontend/src/styles.css
Normal file
3
services/frontend/src/styles.css
Normal file
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
6
services/frontend/tailwind.config.js
Normal file
6
services/frontend/tailwind.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
content: ["./src/**/*.{vue,js,ts,jsx,tsx}"], // 添加此配置
|
||||
theme: { extend: {} },
|
||||
plugins: []
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user